I tried to create dynamicLink at Firebase console to navigate user to download my app at appStore, and when they launch app for the first time I keep getting DynamicLink object with nil url.
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) {
// dynamicLink url is nil
}
}
<FIRDynamicLink: 0x281ad2a40, url [(null)], match type: none, minimumAppVersion: N/A, match message: (null)>
and the url is
MyAppSchema://google/link/?dismiss=1&is_weak_match=1
when I perform diagnostic i got this
---- Firebase Dynamic Links diagnostic output start ----
Firebase Dynamic Links framework version 3.0.1
System information: OS iOS, OS version 12.1.4, model iPhone
Current date 2019-03-28 10:10:21 +0000
Device locale en-US (raw en_US), timezone Asia/Taipei
Specified custom URL scheme is {MyAppSchema} and Info.plist contains such scheme in CFBundleURLTypes key.
AppID Prefix: {AppID Prefix}, Team ID: {teamID}, AppId Prefix equal to Team ID: YES
performDiagnostic completed successfully! No errors found.
---- Firebase Dynamic Links diagnostic output end ----
has tried / confirmed :
- not using safari private mode
- short link / long link
- app not installed
- switch preferredLanguages / region / locale
- preview page enabled
- wifi and Cellular
I opened an issue at Firebase iOS SDK repo
https://github.com/firebase/firebase-ios-sdk/issues/2666
Steps to reproduce:
- app not installed
- click on a dynamicLink
- preview page
- appStore page
- build to device from Xcode
- get DynamicLink object but url is nil
expect step 6 to get url