3

I'm wanting to set up deep linking system to have a fully functional referral system for my mobile app. Going through a lot of the documentation for services like branch.io and firebase, they make it clear that you need to eject you application in order to use a service like deep linking.

This is how I want my deep links to work:

  1. Send link to user who is not on the app
    • Takes the user to the correct appStore/google play store to download
    • Can remember invite code for whole app and specific pages within the app (ex. user1 invites user2 to a room. User2 downloads app, goes through regular onboarding, and then is taken to the room they were invited to.)
  2. Send link to user who has already installed the app
    • Opens app to regular page or a room they were invited too

I'm wondering if it's possible to accomplish this functionality with an expo managed app using any service like branch.io, firebase dynamic linking, or expo by it self? I would like to avoid ejecting to a bare workflow as long as I can.

Thank you in advance for any tips or advice!!

lucas17
  • 31
  • 3

1 Answers1

1

I might be late, but for other people that might stumble into this question the way that I managed to solve it.

At first use Google Play Install Referrer API to get the data I need. When the user first installs the app by providing the following link : https://play.google.com/store/apps/details?id=[package name]&referrer=[data]

In order to get the referrer you must use the Application.getInstallReferrerAsync() from expo.

And it will work only if you tap the link and install the app via the link and click open in the same window otherwise if you exit the install window and open the app via tap on the app you wont get referrer data.

In order to get the data when the user already has the app you can use the Linking module from react native.

Dennis_Z
  • 47
  • 6