Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handleUniversalLink always return false iOS 11 #380

Closed
DennisMostajo opened this issue Nov 8, 2017 · 5 comments
Closed

handleUniversalLink always return false iOS 11 #380

DennisMostajo opened this issue Nov 8, 2017 · 5 comments

Comments

@DennisMostajo
Copy link

Hi everyone:

I have an issue, I try to get the original URL https://bebler.com/email_code/12345678, testing the universal link on Firebase console is https://axd87.app.goo.gl/CF5F, but when I open the dynamic link on my iOS app the method "handleUniversalLink" always return me false and the userActivity.webpageURL logs me: https://axd87.app.goo.gl/CF5F?huid=UO12cAtyFjvBtBW4ehRI9A, my code is as suggest the documentation and the GitHub example:

 @available(iOS 8.0, *)
        func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
            debugPrint("---> userActivity restorationHandler")
            guard let dynamicLinks = DynamicLinks.dynamicLinks() else {
                return false
            }
            let handled = dynamicLinks.handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
                // [START_EXCLUDE]
//                let message = self.generateDynamicLinkMessage(dynamiclink!)
                let message = "APP URL:\(String(describing: dynamiclink?.url?.absoluteString))"
                debugPrint("---> message:\(message)")
                debugPrint("host:\(String(describing: dynamiclink?.url?.host))")
                debugPrint("path:\(String(describing: dynamiclink?.url?.path))")
//                self.showDeepLinkAlertView(withMessage: message)
                // [END_EXCLUDE]
            }
    
            // [START_EXCLUDE silent]
            if !handled {
                // Show the deep link URL from userActivity.
                let message = "continueUserActivity webPageURL:\n\(userActivity.webpageURL?.absoluteString ?? "")"
                debugPrint("---> message:\(message)")
//                showDeepLinkAlertView(withMessage: message)
            }
            // [END_EXCLUDE]
            return handled
        }

how can I force to get the original URL?, thanks!

@edulpn
Copy link

edulpn commented Nov 9, 2017

Also having this issue, my app captures the URL fine (https://<my_app_code>.app.goo.gl/?link=https://www.test.com/?premiumId=123456&ibi=<my_bundle_id>) through Universal Link and Custom Scheme, but the DynamicLinks().handleUniversalLink() always returns false and never calls the completion closure.

@morganchen12
Copy link
Contributor

@OleksiyA FYI

@OleksiyA
Copy link

OleksiyA commented Nov 9, 2017

@DennisMostajo You are likely tapping on FDL from Google Hangouts or Gmail iOS Apps. The issue you are seeing going to be fixed in those Apps soon.
Also we fixed issue in FDL side. In M20.1 release (Firebase Dynamic Links version 2.2.0) such link will work fine.
Core reason here that FDL do not expect any parameters in FDL short link, but here parameter huid is being added.

@edulpn You issue seems unrelated to original poster's issue. Your link looks broken as there two question mark characters in the link. As a debug try to navigate to https://<my_app_code>.app.goo.gl/?link=https://www.test.com/?premiumId=123456&ibi=<my_bundle_id>&d=1 Here verify that what is being displayed is what you actually expect.
If that does not help, please open separate Github issue or Firebase support ticket. Also take at stackoverflow questions for Firebase Dynamic Links https://stackoverflow.com/questions/tagged/firebase-dynamic-links .

@bhavinmdesai
Copy link

@OleksiyA What is the ETA of M20.1 release (Firebase Dynamic Links version 2.2.0) ? We have a feature that needs to go out asap.

Thanks!

@paulb777
Copy link
Member

@bhavinmdesai Firebase Dynamic Links version 2.2.0 released on November 14th and is currently available with pod update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants