7

I've followed the instructions from the official react-native-firebase documentation and everything, as per the instructions, works fine.

It is my understanding that I should be able to create a link like the following in the Firebase Dynamic Links console: https://myapp.page.link/offer?offerid=123456 and be able to receive the offerid parameter in my app. However, when I click that link (in the iOS simulator, Android emulator, and on a real device) the app opens, but I just get a link with the following data:

Received initial link {"minimumAppVersion": null, "url": "https://mysite.co/offers"}

There are no query string parameters attached. Am I missing something in the Firebase Dynamic Link configuration? Or in my implementation of react-native-firebase that was not covered in the documentation linked above? Or is this actually just not possible?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
user2719094
  • 1,611
  • 5
  • 26
  • 36

1 Answers1

11

I think you are confusing deep links with dynamic links. Dynamic links handle your deep links to content depending upon the platform.

Example you have a deep link: https://example.com/offer?offerid=123456 . You wish to open it in your app depending upon the platform.

Suppose you created a domain for dynamic link from console: https://myapp.page.link

Now you can create a dynamic link which opens the deep linked content on your app. The dynamic link can take in only specific parameters as mentioned here. However you can pass your parameters to your deep link,

https://myapp.page.link/?link=https%3A%2F%2Fexample.com%2Foffer%3Fofferid%3D123456&apn=com.example.app&ibi=com.example.app

The above dynamic link opens the deep link in your android app with package name com.example.app and ios app with bundle ID com.example.app.

Ashutosh Pathak
  • 307
  • 2
  • 7
  • 3
    yes! this is exactly what I was missing. the documentation for react-native-firebase is good, but leaves out a lot of this detail. I had not found this document about manually constructing dynamic links, so this is very helpful. thanks! – user2719094 Jun 25 '20 at 15:13
  • 11
    I am still very confused :/ The point is that the offerId is dynamic. If you create this deep link in fb console, in your case the offerId will always be 123456. How this will be dynamic? How you should declare the deep link for this to work? I am trying to add params but something I am missing – Zakos Aug 10 '21 at 12:24