Thursday, April 25, 2024
HomeiOS Developmentios - Dynamic hyperlink url null when app is opened for the...

ios – Dynamic hyperlink url null when app is opened for the primary time after set up


I’m utilizing dynamic hyperlinks and when the consumer installs an app by way of a dynamic hyperlink and opens first time I’ve applied the beneath operate in my scene delegate…

personal func handleFirebaseDynamicLinksFromScheme(_ url: URL) {
    guard let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) else {
        print("Did not retrieve dynamic hyperlink")
        return
    }
    
    if dynamicLink.url != nil {
        handleIncomingDynamicLink(dynamicLink)
    } else {
        print("Dynamic hyperlink is current however doesn't include a URL: (dynamicLink)")
    }
}

// Name for a launched app after obtain from AppleStore
 func scene(_ scene: UIScene,
            openURLContexts URLContexts: Set<UIOpenURLContext>) {
     if let schemeURL = URLContexts.first?.url {
         handleFirebaseDynamicLinksFromScheme(schemeURL)
         
        print("handleFirebaseDynamicLinksFromScheme url = (schemeURL)")
     }
     
 }

however I get printed “Dynamic hyperlink is current however doesn’t include a URL” and in dynamic hyperlink URL is null. What could be the explanation? as a result of earlier than it was working correctly. and likewise different capabilities to get dynamic hyperlinks and their URLs working correctly (when the app is put in).



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments