The plugin works without any issues on Android. But in IOS, when someone clicks the link the app opens but the onDynamicLink() is never called.
We are calling onDynamicLink() in the initializeApp() inside platform ready callback and added GoogleAndroidClientId and GoogleIOSClientId to the platform preferences as mentioned in the documentations. We also have both google-services.json and GoogleService-Info.plist in the project root folder.
We are using a custom domain with the dynamic links and configured it in Firebase console and in XCode we added FirebaseDynamicLinksCustomDomains as mentioned here.
We get couple of errors in XCode console:
[Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; ( FirebaseApp.configure() in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8
and (API Keys removed)
2020-03-12 22:15:10.220893+0300 Doorek[32896:4363162] Starting Firebase DynamicLinks plugin 2020-03-12 22:15:10.485683+0300 Doorek[32896:4363376] Task <C948DCF9-2A18-40F9-8A24-FDF61460D9C3>.<2> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x28255f5d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=, NSErrorFailingURLKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}
I’ve gone through our configurations in Firebase and our implementation tens of times and I honestly don’t know what is wrong. It just does not work in IOS.
I got a similar problem, but the error is related to the dependency library firebase-analytics:
2022-02-23 00:06:23.837636+0100 AppName[62116:18145645] Starting Firebase Analytics plugin
2022-02-23 00:06:23.838555+0100 AppName[62116:18145956] 8.8.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `FirebaseApp.configure()` to your application initialization. This can be done in in the App Delegate's application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI). Read more: https://goo.gl/ctyzm8.
2022-02-23 00:06:23.872266+0100 AppName[62116:18145958] 8.8.0 - [Firebase/Analytics][I-ACS023007] Analytics v.8.8.0 started
In my case I didn’t see any log related to DynamicLinks, it seems it’s not starting at all, because Starting Firebase DynamicLinks plugin` is not triggered.
My actual implementation inside app.component.ts is:
---- Firebase Dynamic Links diagnostic output start ----
Firebase Dynamic Links framework version 8.8.0
System information: OS iOS, OS version 15.2, model iPhone
Current date 2022-02-23 08:47:57 +0000
Device locale it-IT (raw it_IT), timezone Europe/Rome
ERROR: UIApplication delegate (null) does not implements selector application:openURL:options:. FDL depends on this implementation to retrieve pending dynamic link.
ERROR: Specified custom URL scheme is (null) but Info.plist do not contain such scheme in CFBundleURLTypes key.
AppID Prefix: SV54DW8788, Team ID: SV54DW8788, AppId Prefix equal to Team ID: YES
performDiagnostic detected 2 ERRORS.
---- Firebase Dynamic Links diagnostic output end ----