avioli / uni_links

Flutter plugin for accepting incoming links.
BSD 2-Clause "Simplified" License
563 stars 303 forks source link

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

Open ryanhanks opened 3 years ago

ryanhanks commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Here's what I have for Signing & Capabilities in Xcode for my Runner:

Screen Shot 2021-06-17 at 9 14 11 PM
ryanhanks commented 3 years ago

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

Holofox commented 3 years ago

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

nourski commented 3 years ago

@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

shabeenabarde commented 2 years ago

@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?