Deep Link does not contain valid required params while clicking a dynamic link

佐手、 提交于 2021-02-09 12:06:57

问题


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?

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

} and function from docs:

@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
}

and

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)
    }
    }
 }

回答1:


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.



来源:https://stackoverflow.com/questions/54294267/deep-link-does-not-contain-valid-required-params-while-clicking-a-dynamic-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!