Firebase dynamic deep link comes after installation

I am trying to use Firebase to transfer deep links to my application that survive installation.

To test this, I follow the steps provided by the Firebase documentation and the Firecast video here in about 12min 40 seconds. These steps are as follows:

  • First I uninstall the application from my device.
  • Then I click the link to open the application store.
  • Then I launch my application from xcode.
  • Expected: the dynamicLink.url property will be equal to "https://www.example.com/data/helloworld" in the application: openURL
  • Reality: the dynamicLink.url property arrives at zero.

This is the deeplink url I created in the Firebase console: https://nqze6app.goo.gl/RIl8

This is the URL that is passed to the application: openURL before passing to dynamicLinkFromCustomSchemeURL: com.johnbogil.voices: // google / link / off? fdl_cookie

This is the code of my openURL call:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options { FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url]; if (dynamicLink) { NSLog(@"I am handling a link through the openURL method"); [self handleDynamicLink:dynamicLink]; return YES; } else { return NO; } } 

Not sure why dynamicLink.url arrives at zero. Any help is appreciated.

+2
source share
2 answers

For those who still face the same error ...

  • If your application:openURL receives a call, and
  • It seems you get a valid dynamicLink object from your dynamicLinkFromCustomSchemeURL method, but
  • The url parameter of this dynamicLink is nil

Then double check if you are in "Private" mode in Safari. This will be useless with the capabilities of Dynamic Links Firebase to retrieve the source link you clicked on.

+1
source

I had the same problem. I received the restoreHandler callback , but in handleUniversalLink the dynamiclink callback and the error was zero. After spending some time, I found my problem.

It turns out url is case sensitive. For example, if your URL is:

https://xzz6b.app.goo.gl/0ewv

and you wrote down https://xzz6b.app.goo.gl/0ewv in the notes and clicked on it. It will load your application and even give you a restoreHandler callback , but dynamiclink will be zero.

You can try it even in the browser.

Hope this helps anyone.

+2
source

All Articles