gpt4 book ai didi

ios - 从链接打开应用程序时,appsflyer 深度链接不起作用(未调用委托(delegate)方法)

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:08:37 30 4
gpt4 key购买 nike

我已与 AppFlayer SDK 进行深度链接,通用链接成功打开应用程序意味着深度链接工作正常。

现在的问题是,当应用程序从链接打开时,它不会重定向到它的页面。但是,如果我将应用程序置于后台并置于前台,那么深度链接就会起作用

我遵循这个指南。( link )

AppFlayer 设置代码

func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
AppsFlyerTracker.shared().appsFlyerDevKey = "xxxxxxxxxxxx"
AppsFlyerTracker.shared().appleAppID = "xxxxxxx"
AppsFlyerTracker.shared().isDebug = false
AppsFlyerTracker.shared().delegate = self

self.pushNotificationService(application)

objStoryBoard = UIStoryboard(name:"Main", bundle: nil)

return true
}

AppFlayer 代表

Edit :: This method not called when application is open from link of appsflayer marketing

//MARK:
//MARK: appflayer delegate
func onAppOpenAttribution(_ installData: [AnyHashable: Any]) {

NSLog("installData ::%@", installData )

if let link = installData["link"] as? String
{
if link.contains(read_Localizable("titleAppflayer"))
{
if let arrQueryItems = URLComponents(string: link)!.queryItems {

for obj in arrQueryItems {
if obj.name.caseInsensitiveCompare(read_Localizable("appflayerParameter")) == .orderedSame
{
self.redirectAppflayer(withstrUrl: obj.value!)
return
}
}
}
}
}
}

应用的用户事件方式

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {

// if let url = userActivity.webpageURL
// {
// NSLog("URL :: %@",[url])
// }

if userActivity.webpageURL?.absoluteString.contains(read_Localizable("titleAppflayer")) == true
{
AppsFlyerTracker.shared().continue(userActivity, restorationHandler: restorationHandler)
return true
}

return Branch.getInstance().continue(userActivity)
}

让我知道我做错了什么。

最佳答案

当 AppsFlyerTracker 应该从 didFinishLaunchingWithOptions 调用时,您却从 willFinishLaunchingWithOptions 调用 AppsFlyerTracker。能不能把相关代码搬过来再测试一下?

关于ios - 从链接打开应用程序时,appsflyer 深度链接不起作用(未调用委托(delegate)方法),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45523157/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com