0

I have many "Associated Domains" which has prefix difference on iOS.

Ex:

https://ironman.unilink.com

https://captain.unilink.com

https://hulk.unilink.com

https://thor.unilink.com

....

=> They are sub-domains of domain https://*.unilink.com

How to add more "Associated Domains" with on iOS?

  • At file Entitlements.plist, How do I add it?

I try to add it, but Can't open with sub-domain is called

enter image description here

Please help me!

Thanks!

  • In order to use Universal Links you must have a corresponding website for your app and the ability to upload a file to it. If you don’t have a website then you can not use Universal Links. We need to create an association file that lets Apple verify that you are the owner of the domain.https://xamarinhelp.com/ios-universal-links/ – Junior Jiang Jun 05 '19 at 05:31
  • @JuniorJiang-MSFT , I want to question: how to add a domain but my app can know multi sub-domain. Example: I have many "sub-domain" like `https://ironman.unilink.com`, `https://captain.unilink.com`, `https://hulk.unilink.com`, etc... They have common is `https://*.unilink.com`. How can I add them to `Associated Domains` at `Entittlements.plist` file? (Just one domain but my app can know all sub-domain). – Bill Nguyen Jun 05 '19 at 08:48
  • @JuniorJiang-MSFT If I add all sub-domains to `Associated Domain` of `Entitlements.plist` file, It will be work. But I have about 40 sub-domains .... And Apple doc says to limit this list to no more than about 20 to 30 domains. Please supply me with your ideas. – Bill Nguyen Jun 05 '19 at 09:02
  • Have a look at this document.https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW1 – Junior Jiang Jun 05 '19 at 09:55
  • @JuniorJiang-MSFT I readed it at part "**Preparing Your App to Handle Universal Links**" of https://medium.com/@abhimuralidharan/universal-links-in-ios-79c4ee038272 . But I should add domain at `Associated Domains` of `Entittlements.plist` file, how? – Bill Nguyen Jun 05 '19 at 10:26
  • I found a solution on stackoverflow: https://stackoverflow.com/questions/37301392/ios-universal-links-with-wildcards-not-working . but I don't know his way. Can you explain to me? – Bill Nguyen Jun 05 '19 at 11:07
  • Okey, I think it’s already clear in this discussion.simply create a main subdomain where the "apple-app-site-association" file is hosted, and then create sub-subdomains for that domain. That is, both the primary domain and the subdomain need to have "apple-app-site-association" file. – Junior Jiang Jun 06 '19 at 03:53

2 Answers2

2

From shared link, simply create a main subdomain where the apple-app-site-association file is hosted, and then create sub-subdomains for that domain.

Such as:

-- app.domain.com (this is the main subdomain; it hosts apple-app-site-association file)

-- server1.app.domain.com (this also hosts the apple-app-site-association file)

-- server2.app.domain.com (...)

-- server3.app.domain.com (...)

That is, both the primary domain and the subdomain need to have apple-app-site-association file.

Junior Jiang
  • 12,430
  • 1
  • 10
  • 30
0

Apple should say that *.domain.com works for >= 9.3.2 in this link Support Universal Links

https://stackoverflow.com/a/37317617/583616

I'm experienced the same problems and ended up adding all my domains explicitly (but I'm targeting iOS 9+)

applinks:uat.mydomain.com
applinks:www.mydomain.com
applinks:mydomain.com

If you have lots of subdomains and targeted iOS 9.3+ then you should be able to have just the one entry.

applinks:*.mydomain.com
RobbiewOnline
  • 1,350
  • 1
  • 16
  • 36