I have two build configurations: App and App Stage.
Each configuration has different Associated Domains
configured: app.mydomain.com and app-stage.mydomain.com.
Of course, each website exposes different apple-app-site-association
files: app.mydomain.com/apple-app-site-association and app-stage.mydomain.com/apple-app-site-association (HTTP 200, without .json extension, etc.).
The problem is that only first registered domain (unfortunately it's Stage) is working properly. When I have both apps installed, each deep link (app.mydomain.com/home and app-stage.mydomain.com/home) opens the App Stage. When I have only App Sage installed, also both links open it. When I have only App installed none link is working. It looks like the subdomain of Associated Domains
is ignored and only mydomain.com is taken into account.
I assume that build configurations are defined correctly because I'm also differentiating other settings like Facebook, Google and others.
Have you ever encountered a similar problem? Is it allowed to use different subdomains of the same domain for the Associated Domains
usage?
UPDATE:
Following @clayjones94 instructions, I checked whether each app downloads a correct JSON file using Charles Proxy. I found out that that App Stage is fetching the correct file, while App doesn't fetch any file.
I have also edited URL in app-stage.mydomain.com/apple-app-site-association HTTP request in Charles to make sure that app.mydomain.com/apple-app-site-association returns the correct JSON. When I removed -stage
from the URL and repeated the call it has fetched a different JSON file, so I confirmed that the backend is working correctly for both configurations.
First I thought that my build configurations were incorrect. So I decided to replace App's applinks:app.mydomain.com
associated domain with Stage's applinks:app-stage.mydomain.com
to see if App configuration is able to fetch App Stage file. It worked, the App had downloaded App Stage's JSON file. Again, it looks like the subdomain of Associated Domains
is ignored and only first registered subdomain is taken into account.
mydomain.com/apple-app-site-association
serve anything? – Paigeapple-app-site-association
file - only the bundle identifier is different (both apps are in the same team). – Moonfish