简体   繁体   中英

Firebase dynamic links for multiple iOS apps in project

I have a firebase project with two iOS apps and two Android apps. These apps needs to share databases and users so this design seems natural.

Regarding dynamic links, Android works like a breeze but I'm struggling with the iOS part.

Basic dynamic links setup is easy, the difficult (impossible?) part is to make dynamic link that routes toward the proper app, based on bundleID.

Firebase auto-generates the apple-app-site-association files but the paths components for all apps is always the same : ["/*"]

{"applinks":
     {"apps":[],
      "details":[
          {"appID":"XXXXX.com.test.app1","paths":["/*"]}, 
          {"appID":"XXXXX.com.test.app2","paths":["/*"]}]
     }
}

As a consequence, the first app app1 always match and all deep links are directed towards this app.

At this point, i'm unable to open a dynamic link to app2 .

The documentation is inexistant for this configuration, even if this fully functional on Android apps.

Am i missing something here ?

Firebase Dynamic Links has limited support for multiple iOS Apps in the same project. We are planning to improve this support, but no ETA on the dates, likely Q1 2018.

Here is one of the most typical example of Firebase Dynamic Links setup for several iOS App in one project: https://photos.app.goo.gl/apple-app-site-association

You still should be able to open app2, if app1 is not installed on iOS device.

I believe you can change order of the Apps in apple-app-site-association by deleting app1 and re-adding app1 to the project.

We do receive more requests on allowing to re-order priority of the App in apple-app-site-association file. For example, developers have free and paid App, so they actually want for dynamic link to work in both Apps.

As a workaround, you may be able to use customURL scheme to re-open correct app2, if app1 was opened when this was not desired. This would be not the best user experience.

Let me know if you have more questions, feel free to open Firebase support ticket to share private information.

As Oleksiy Ivanov has already pointed out , this boils down to the problem, that Firebase Dynamic Links doesn't support using the same URL prefix for multiple iOS apps/targets contained in the same Firebase project.


There are multiple workarounds though:

  1. Using multiple (sub)domains

  2. Use a custom domain

  3. Using multiple Firebase projects


On Android it works out of the box, because you are in charge of matching paths with particular apps within the Manifest file. On iOS it doesn't work, because Firebase is in charge of such matches within the hosted apple-app-site-association file (as you've already pointed out in your question).


For further information, I've written an extensive answer here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM