nativescript-urlhandler
nativescript-urlhandler copied to clipboard
apple-app-site-association / applinks
Does this plugin work with applinks (apple-app-site-association).
I have my app loading with myapp:// and your plugin works perfectly.
I'm really struggling to find anything on the internet as to how to find out what deep link opened the app.
Hopefully I'm not wasting your time with this questions and you might know of something.
I have the same issue here. the callback is actually not triggered at all. @philipmclifton, did you find anything relevant?
I am finding that I can get this to work by making the following change to the urlHandler.ios.ts
enableMultipleOverridesFor(
appDelegate,
'applicationContinueUserActivityRestorationHandler', // changed this from continueUserActivity
function (
application: UIApplication,
userActivity: NSUserActivity
): boolean {
if (userActivity.activityType === NSUserActivityTypeBrowsingWeb) {
let appURL = extractAppURL(userActivity.webpageURL);
if (appURL !== null) {
setTimeout(() => getCallback()(appURL));
}
}
return true;
});
I am not sure if this is going to cause any clashes at this stage. Still testing.
Hi @hypery2k , I have tried the new development version but it doesn't work for the universal link (app link). It works for deep link (both Android and iOS) though.
okay, but is this the same behavior as before or fixes issues already?
Will look for the app link issue. I think the metadata is just missing: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html
It is the same issue as before (1.2.3), only iOS universal link doesn't work.
I have the same issue on android so app link not working and the disambiguation dialog still showing.
<intent-filter
android:autoVerify="true">
<data
android:scheme="https"
android:host="my.host.com"
android:pathPattern="/launchapp" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
For anyone still struggling with this, I've made a new NS plugin specifically for universal links. https://www.npmjs.com/package/nativescript-plugin-universal-links
If you still need to support deep linking, you will need to use both.
Hi @sebestindragos .
Do you happen to have a demo project on how to use your package? I'm trying to use it, but I'm kind stuck.
@ronalson the package is fairly easy to use, the instructions are in the Readme. Open a new issue in the repo and I'll help you set it up.