单击动态链接时,深度链接不包含有效的必需参数 [英] Deep Link does not contain valid required params while clicking a dynamic link

查看:187
本文介绍了单击动态链接时,深度链接不包含有效的必需参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将我的动态链接设置为文档,但是在单击链接时显示:

i have setup my dynamic link as a documentation but while clicking a link it shows :

Deep Link does not contain valid required params. URL params: {
"_cpb" = 1;
"_cpt" = cpit;
"_fpb" = "CJsFEPcCGgVlbi1VUw==";
"_iumchkactval" = 1;
"_iumenbl" = 1;
"_osl" = "https://ttnfleetsolutions.page.link/azrN2YkJQncowdQ78";
"_plt" = 3698;
"_uit" = 1651;
apn = "com.ttnfleetsolutions.ttnfleet.debug";
cid = 4103105643708739955;
ibi = "com.ttnfleetsolutions.ttnfleetCustomer";
link = "https://www.ttnfleetsolutions.com/";

}

单击动态链接后,应用程序已打开,但未调用任何功能,并显示错误如何知道是否单击了链接?

App is open when dynamiclink clicked but it dose not call any function and show error how to get know link clicked or not?

我的didfinishlunchingwithoption方法:

my didfinishlunchingwithoption methode:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{
    IQKeyboardManager.shared.enable = true
    FirebaseApp.configure()       UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.clear], for: .normal)
    UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.clear], for: UIControl.State.highlighted)
    GMSServices.provideAPIKey(GOOGLE_API_KEY)
    GMSPlacesClient.provideAPIKey(GOOGLE_API_KEY)
return true

}和功能从文档:

@available(iOS 9.0, *)
func application(_ app: UIApplication, open url: URL, options: 
[UIApplication.OpenURLOptionsKey : Any]) -> Bool {
    return application(app, open: url,
                       sourceApplication: 
options[UIApplication.OpenURLOptionsKey.sourceApplication] as? 
String,
                       annotation: "")
 }


 func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
    if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) {
      print("DynamicLink\(dynamicLink)")

        return true
    }
    return false
}

extension AppDelegate {
func application(_ application: UIApplication,
                 continue userActivity: NSUserActivity,
                 restorationHandler: @escaping ([Any]?) -> Void) -> 
Bool {
    guard
        userActivity.activityType == NSUserActivityTypeBrowsingWeb,
        let webpageURL = userActivity.webpageURL else {
            return false
    }
    return 
DynamicLinks.dynamicLinks().handleUniversalLink(webpageURL) { 
dynamiclink, error in
        guard let url = dynamiclink!.url else { return }


        print("url:", url)
    }
    }
 }

推荐答案

如果您使用深版链接的长版版本打开应用程序,则应确保您的 link 值经过百分比编码,内部链接中的&,?,= 符号被Firebase编码并正确处理的方式.

If you are opening the app using the long version of the deep link you should make sure your link value is percent encoded, that way your &,?,= signs inside the inner link are encoded and properly processed by firebase.

这篇关于单击动态链接时,深度链接不包含有效的必需参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆