简体   繁体   中英

Universal Links work in simulator but not on real devices

I added the apple-app-site-association:https://www.sport5.co.il/.well-known/apple-app-site-association I started with the "applinks" and when that didn't work I also added webcredentials and activitycontinuation.

I enabled Associated Domains for this app id and in the project I added applinks:sport5.co.il, applinks:m.sport5.co.il & applinks:*.sport5.co.il in the associated domains which now appear in the entitlements file.

I checked the domain in the apple validation tool https://search.developer.apple.com/appsearch-validation-tool/ and that worked.

I tested it on multiple simulators and in each of them I could go to the website in safari and it showed me the banner above, I also sent a fake message in the Messages and that showed the details and opened the app.

I also tried changing Deployment Target to iOS 10.

But when I try to install it on the device from xCode, either in debug or release configuration or even upload the build to test flight, this doesn't work (Tried on iPhone 5s, iPhone 8 & iPhone XR).

I searched the internet and saw many people saying that universal links did not work for them until they did this and that and I tried every thing they said but I still can't make it work on real devices.

Is there something else I should do to make this work or did I get something wrong?

You have to wait a bit ( from minutes to hours ) after your app is successfully installed and launched to let iOS fetch the associated domain.

You can use a proxy like Charles to check if iOS has make the call.

遇到了同样的问题,并通过在 apple-app-site-association 文件中替换 App ID 前缀而不是团队 ID 来解决

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