How to shorten a Firebase dynamic link using my own domain name

I am trying to implement Firebase Dynamic Links in an iOS app. The goal is to have a clean URL for marketing purposes so that people can share links on social networks. The idea is that people will share a clean URL that starts with my domain name.

When the application is installed after clicking on this link, we want to be able to track who referenced the application by looking at the payload supplied by Firebase. I think this goal is similar to the Firebase use case , to convert web users to mobile application users.

An example of a link that I would like to provide for sharing on social networks: http://example.com/my-payload-here

I have tried several cases, but I cannot get the behavior that I am looking for anyway. Has anyone implemented this successfully before?

Here is my test procedure:

  • Uninstall application
  • Send the test link in iMessage to yourself
  • Tap the link on my iOS device (without using a simulator)
  • Install the app from the App Store
  • Launch the application after the download is completed by clicking the "Open" button in the App Store.

Below are my findings:

  • Short link created using the Firebase Console ( https://xyz.app.goo.gl/ABCD ) - The link opens in the App Store, I install the application. When I run the application after installation, the payload is not delivered. If I exit the application, return to the link in iMessage and start the second time the payload is delivered.

  • Long link identical to "Long Dynamic Link" from the Firebase console for the link generated in # 1 ( https://xyz.app.goo.gl/?link=http://example.com/my-payload-here&isi=12345&ibi = com.example.MyApp ) - the behavior is identical to # 1

  • Short link using my domain ( http://example.com/redirect/my-payload-here configured to 301 redirect to URL in # 2) - Opens in the App Store. I install. When I run the application after installation, the payload is not delivered. If I exit the application, go back to the link in iMessage and run the second time, the link still goes to the App Store.

Some questions that I have:

  • Why is the payload delivered at first launch for cases 1 and 2?
  • How can we launch this application launch and deliver a payload instead of going to the App Store?

I also reviewed the Firebase flowchart for deep link in case 2.

+9
ios firebase firebase-dynamic-links
source share
2 answers

In Firebase, this is not possible at this time. If you need white URLs, you need to either create one yourself or use a more powerful link platform like Branch.io (full disclosure: I'm in the office).

To answer your questions specifically:

  • I used Firebase Dynamic Links in a testbed application and I can confirm that the connection through the installation for the first time works for both the long and short URLs. There is probably something wrong with your AppDelegate configuration, so we can take a look at this if you want to share the code.
  • Firebase does not currently support user domains. Theoretically (if you can solve the first problem above), you can get this to work for the first installation using the redirect as you tried. However, you can never force him to run the application with a link to the Firebase data as soon as the application is installed. This is due to the fact that Universal Links operate on the basis of domain links and do not even request a web addressee. Even if you enable Universal Links manually in your own domain, the application will open immediately without calling Firebase, and these links will never be installed.
+3
source share

The Google Firebase team has added support for custom subdomains in Dynamic Links.

  • You can now specify up to five page.link custom subdomains for your dynamic links. Short links using these new custom subdomains look like this: https://example.page.link/abcXYZ

  • Firebase Dynamic Link domains assigned to projects currently cannot be deleted (the firebase team is working on this.)

  • Now you can rename URL patterns that can be used as a deep link (link) of a dynamic link or a return link (ifl, ipfl, afl, ofl). If you specify a whitelist, dynamic links will not be redirected to URLs that do not match the whitelisted pattern.

  • You can try both of these features in the Firebase console .

+2
source share

All Articles