sebestindragos / nativescript-plugin-universal-links

Universal links (IOS) and App Links (Android) support for NativeScript.
8 stars 7 forks source link

Any idea how this loads in an NS Core project? #2

Closed sitefinitysteve closed 4 years ago

sitefinitysteve commented 4 years ago

Testing iOS right now, in the simualtor...

I've got it just above applicationRun

registerUniversalLinkCallback(ul => {
    Util.log("------------------------- UNIVERSAL LINK!")
    // use the router to navigate to the screen
});

applicationRun({ moduleName: "app-root" });

I have the apple file on the website @ https://xposedapp.co/apple-app-site-association I have the appentitlements assigned\xcconfig changes per the docs

But nothing gets triggered, so do you think maybe I'm registering in the wrong spot, OR perhaps the delagate maybe conflicts with like nativescript-plugin-firebase or something? I've had conflicts before...

Any help would be fantastic if you have any idea,

Cheers, Steve

sebestindragos commented 4 years ago

First things first. Does the app launch when you tap a URL? Even without calling registerUniversalLinkCallback, if you have everything set up right in XCode, your app should launch.

sebestindragos commented 4 years ago

Btw, just looked at your hosted file and it returns the wrong Content-Type as application/octet-stream instead of application/json

sitefinitysteve commented 4 years ago

I thought that looked off compared to the example from firebase, was JSON in the browser vs a download.

I'm trying to get the php guy to update that, appreciate your help, honestly. It's the last part of this app, thanks man, nice plugin.

sebestindragos commented 4 years ago

Glad I could help.

sitefinitysteve commented 4 years ago

Okay so the app.entitlements has the domains

    <key>com.apple.developer.associated-domains</key>
    <array>
        <string>applinks:xposedapp.co</string>
        <string>applinks:j4ctx.app.goo.gl</string>
    </array>

It's properly returning JSON now for the route

I'm running this to load the page in the simulator

xcrun simctl openurl booted "https://xposedapp.co/u/mkbhd"

Does it WORK in the simulator, or only on device? What am I missing?

sitefinitysteve commented 4 years ago

Ok, the issue was the applinks needed the TEAMID added as well, thanks again

sebestindragos commented 4 years ago

Glad you figured it out.