uni_links icon indicating copy to clipboard operation
uni_links copied to clipboard

Opening https url with `xcrun simctl openurl` doesn't launch app

Open ryanhanks opened this issue 3 years ago • 6 comments

I'm using https scheme and am testing in iOS Simulator which is running iOS14.2.

I'm starting with a fresh flutter app and trying to get xcrun simctl openurl to launch my flutter app, but the URL I'm opening is opening in Safari and not launching my app.

Note: I'm not attempting to handle the links within my flutter app yet, as I can't get the simulator to open the app yet. I'm assuming iOS should at least open my app if my apple-app-site-association file is correct and my entitlements are properly configured. If this assumption is false, please let me know.

I've uploaded the app to https://github.com/ryanhanks/uni_links_example. The git history on this app should reflect the steps I've taken in producing the results I'm seeing.

The following are the steps I've taken:

  1. Create a new flutter app via flutter create --org net.bestow-sandbox --project-name app --platforms ios uni_links_example
  2. Configure automatic signing in Xcode
  3. Upload the apple-app-site-association to https://app2.bestow-sandbox.net/.well-known/apple-app-site-association
  4. Enable the app-site association entitlement
  5. Execute flutter run to get the app installed on the simulator
  6. Open a file on my domain via /usr/bin/xcrun simctl openurl booted https://app2.bestow-sandbox.net/index.html -> opens in Safari
  7. Enable the app-site association entitlement in developer mode
  8. Open a file on my domain via /usr/bin/xcrun simctl openurl booted https://app2.bestow-sandbox.net/index.html -> opens in Safari

I've validated the apple-app-site-association file via https://branch.io/resources/aasa-validator/

What am I missing here?

ryanhanks avatar Jun 18 '21 02:06 ryanhanks

Here's the config for my App ID in Apple Developer Certificates and Identifiers: Screen Shot 2021-06-17 at 9 11 40 PM

ryanhanks avatar Jun 18 '21 02:06 ryanhanks

Here's what I have for Signing & Capabilities in Xcode for my Runner: Screen Shot 2021-06-17 at 9 14 11 PM

ryanhanks avatar Jun 18 '21 02:06 ryanhanks

https://github.com/avioli/uni_links/issues/95 appears to be related to what I'm observing.

ryanhanks avatar Jun 18 '21 02:06 ryanhanks

This does not work only on iOS simulators, on real devices I did not notice problems.

Holofox avatar Jul 22 '21 05:07 Holofox

@ryanhanks did you ever find a solution? I'm experiencing the same issue, can't seem to get iOS universal linking to work, tried on simulator & real device

nourski avatar Aug 28 '21 15:08 nourski

@ryanhanks did you ever find a solution? I'm experiencing the same issue, can't seem to get iOS universal linking to work, tried on simulator & real device

Hi, did you get anything?

shabeenabarde avatar Jun 29 '22 13:06 shabeenabarde