【问题标题】:Facebook iOS Deferred link `url` always return `nil`Facebook iOS延迟链接`url`总是返回`nil`
【发布时间】:2021-06-16 12:33:21
【问题描述】:

任何人都可以帮助我吗??,我正在尝试使用 Facebook 的延迟链接功能:

 AppLinkUtility.fetchDeferredAppLink { (url, error) in ... } 

不管我用哪种方式输入代码,url 总是nil

重现此问题所需的步骤是什么? 很简单的描述:
1- 登录您的 Facebook
2- 然后点击https://developers.facebook.com/tools/app-ads-helper.
2- 从下拉列表中选择您要测试的应用。
3-点击提交。
4- 在底部,您会在开发者工具下找到“深度链接测试器”。
5- 点击“测试深层链接”,然后在对话框中输入您的深层链接。
6- 选择“发送通知”和“延迟发送”复选标记。
7- 然后你会收到一个通知到你的 Facebook 应用程序。
8- 点击通知,打开 App Store。
9- 通过 Xcode 安装应用程序。

然后在我的代码中我尝试了至少 5 个变体:

例如我试过这个:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // Set the trackings to true in test mode
        Settings.setAdvertiserTrackingEnabled(true)
        Settings.isAdvertiserIDCollectionEnabled = true
        Settings.isAutoLogAppEventsEnabled = true

        // Initialize the Facebook SDK
        ApplicationDelegate.initializeSDK(nil)

        AppLinkUtility.fetchDeferredAppLink { (url, error) in
            if let url = url {
                print(url)
            }
            print(error as Any)
        }
}

无论我尝试哪种变体,结果总是一样的,url = nil

我正在使用:

  • Xcode 版本:12.4
  • Swift 版本:5.2
  • SPM安装Facebook SDK

我之前做过一些搜索,但对我没有任何帮助:
(不工作)。
iOS - Test getting Facebook deferred deep link.

(也无法正常工作)
How to use Facebook deferred deep linking feature for new installs and to test the same before publishing iOS App to appStore?

(不是我的情况)
iOS - Test getting Facebook deferred deep link

(现在的不同情况,我们必须实施用户的 IDFA 同意)
Facebook deferred deep link on iOS not working

(没有答案)
https://developer.apple.com/forums/thread/77046 https://developers.facebook.com/community/threads/304205737647076/?locale=es_LA

特别说明:
此代码:ATTrackingManager.requestTrackingAuthorization(completionHandler:) 从不显示提示并始终在真实设备中返回 denied(iPhone 12 和 iPhone SE(第 2 代)iOS 14.4)。我不知道这对这个问题是否重要,但我认为提及这一点很重要

【问题讨论】:

    标签: ios swift facebook notifications deferred


    【解决方案1】:

    显然,IDFA 的问题始终是 00000000-0000-0000-0000-000000000000,希望当这个问题解决后,这个问题就会消失。
    来自 Facebook 团队:
    "感谢您的回复。由于广告 ID 无效,返回的 appLinkData 始终为空。"

    https://developers.facebook.com/support/bugs/349628616375797/

    更新:

    这是 Facebook 的问题,更多详情请点击此处: https://developers.facebook.com/bugs/278254417309196

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-15
      • 2020-12-24
      • 2016-08-25
      • 1970-01-01
      • 2019-03-12
      • 1970-01-01
      相关资源
      最近更新 更多