2

When handling a dynamic link with the app installed FIRDynamicLinks handleUniversalLink returns always false and the callback never gets called.

We have a subdomain already linked: https://app.[mycompany].com/ so the apple-app-site-association file is ready and reachable.

The FirebaseDynamicLinks SDK is in our app pods (v 4.0.1) Our app cababilities include as Associated Domains both: applinks:*.[mycompany].com and applinks:app.[mycompany].com We are using Xcode 11.3.1 and our AppDelegate is in Objective-C

This is our AppDelegate code following the documentation from Firebase :

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray<id<UIUserActivityRestoring>> * __nullable restorableObjects))restorationHandler
    {

        // DynamicLinks: App installed. universal link
        NSURL *incomingURL = userActivity.webpageURL;

        if (incomingURL != nil) {
            NSLog(@"incoming URL: %@",incomingURL);
            BOOL linkHandled = [[FIRDynamicLinks dynamicLinks] handleUniversalLink:incomingURL
                                                                        completion:^(FIRDynamicLink * _Nullable dynamicLink, NSError * _Nullable error) {
                if (error != nil) {
                    NSLog(@"error transforming: %@ into a dynamicLink (%@): ", incomingURL, error.localizedDescription);
                } else if (dynamicLink != nil) {
                    [self handleIncomingDynamicLink:dynamicLink];
                }
            }];

            if (linkHandled) {
                return true;
            } else {

                // OLD universal link handling
                NSLog(@"incoming URL not handled");
            }
        }
        return NO;
    }

The dynamic link is: https://app.[mycompany].com/?link=https://[mycompany].com/[featureID]?token%3D12345&isi=[1234567890]&ibi=com.[mycompany].app And it has been generated directly from the Firebase console following this tutorial.

Still the boolean for the linkHandled is always false and the callback never gets called.

We've checked:

https://github.com/firebase/quickstart-ios/issues/380 and Firebase dynamic linking - Continueuseractivity not returning dynamic link url

but they were no helpful.

Celiuska
  • 45
  • 6

1 Answers1

0

Please verify you have Team ID set in Firebase Console - Settings - General - Your apps - [App name] - Team ID

hohteri
  • 174
  • 1
  • 5