简体   繁体   中英

Firebase Dynamic Links on iOS sometimes fails

I have a Dynamic Link issue on my iOS app.

Scenario: user request forgot password email -> receives email with dynamic link

iPhone A: dynamic link opens app correctly

iPhone B: dynamic link opens Firebase redirect page with “Open” button

What I've been researching:

  1. The app version is the same
  2. The iOS version is the same
  3. The user account is the same
  4. apple-app-site-association file shows correct appID
  5. ?d=1 debugging shows errors for Android and phising but not for iOS
  6. DynamicLinks.performDiagnostics(completion: nil) says: performDiagnostic completed successfully! No errors found.

The inconsistency makes it almost impossible to debug this issue more.

Does anyone have a clue on how to research/debug this more or even better on how to fix this? Thanks a lot in advance!

Code from AppDelegate to configure Firebase:

// Configure Firebase
#if PRODUCTION
    let GoogleServiceName = "GoogleService-Info"
#elseif ACCEPTANCE
    let GoogleServiceName = "GoogleService-Info-Acceptance"
#else
    let GoogleServiceName = "GoogleService-Info-Development"
#endif
let filePath = Bundle.main.path(forResource: GoogleServiceName, ofType: "plist")
guard let fileopts = FirebaseOptions(contentsOfFile: filePath!)
    else {
assert(false, "Couldn't load config file")
    return false
}
#if PRODUCTION
    fileopts.deepLinkURLScheme = "***-production"
#elseif ACCEPTANCE
    fileopts.deepLinkURLScheme = "***-acceptance"
#else
    fileopts.deepLinkURLScheme = "***-development"
#endif
FirebaseApp.configure(options: fileopts)

Firebase Diagnostics debugging:

---- Firebase Dynamic Links diagnostic output start ----
Firebase Dynamic Links framework version 3.0.1
System information: OS iOS, OS version 11.4, model iPhone
Current date 2018-07-30 11:28:41 +0000
Device locale en-US (raw en_US), timezone Europe/Amsterdam
WARNING: iOS Simulator does not support Universal Links. Firebase Dynamic Links SDK functionality will be limited. Some FDL features may be missing or will not work correctly.
Specified custom URL scheme is ***-acceptance and Info.plist contains such scheme in CFBundleURLTypes key.
performDiagnostic completed successfully! No errors found.
---- Firebase Dynamic Links diagnostic output end ----

For those who end up here, I found out what it was:

It wasn't a code or configuration problem but apparently users can disable Universal Links per device and per app which will be persistent after re-install. The full answer can be found here: link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM