Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL Scheme and Universal Links - testing external links #341

Open
rolinger opened this issue Jun 23, 2022 · 0 comments
Open

URL Scheme and Universal Links - testing external links #341

rolinger opened this issue Jun 23, 2022 · 0 comments

Comments

@rolinger
Copy link

rolinger commented Jun 23, 2022

My app uses both a custom URL Scheme and Universal Links. I deployed the custom url scheme a while ago and it works. I just now installed Universal links. But I found some interesting behavior between android and ios and the two methods.

1. Custom URL Scheme (cordova-plugin-customurlscheme) will open myapp:// links and pass in the full url myapp://this/path?var1=value1&var2=value2 to the window.handleOpenURL function.

2. Universal links will open 'https://myapp.com` links and pass in the full url https://myapp.com/this/path?var1=value1&var2=value2 to the universalLinks.subscribe('externalLink', 'app.onExternalLink')

On iOS , each type of link (custom scheme or standard url) will trigger their corresponding event opener.

However, on Android, I have found that any external link, whether a custom scheme (myapp://) or a standard URL will trigger both the custom url opener (handleOpenURL) and the universal link subscriber. So for the Universal Links handlers, I am only loading universal links event handlers for iOS and just using the custom url scheme handleOpenURL function to manage both incoming custom url schemes and standard URLs. Inside the function I am just testing for the URL scheme to determine how to process the url parameters for each.

I have also found that Safari will treat a custom scheme as a clickable link while Chrome does not. I test safari and chrome on both and iPhone and an Android phone and the behavior is the same. Thus its def not the phone determining if the custom url scheme is clickable or not, its the browsers themselves.

3. iOS App Search API Validation Tool - is a piece of garbage. I have deployed the apple-app-site-association file to the root of my website AND to the /.well-known/ directory. The validation tool hits my site, grabs the file (both of them actually) and then gives me an Error no apps associated with url As well, according to Apple Universal Links troubleshooting guides, when the app is installed and launched the app is supposed to retrieve the server file too - however my server logs never show the app requesting the file.

YET....Universal Links does work on my iPhone (...and Android too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant