Giter Site home page Giter Site logo

nativescript-plugin-universal-links's People

Contributors

keerl avatar luiguild avatar nathanwalker avatar sebestindragos avatar tobydeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nativescript-plugin-universal-links's Issues

Execution on "cold" startup

Hi thx for sharing this wonderful plugin with us.
It is pretty neat but currenlty I run into a single issue I was not capable of resolving yet. Mabye you have an idea where to start.

I use a nfc tag with a custom schema e.g myapp://test
The android device is able to resolve that and open the app.
Now I have on problem:
When the app was already started the registerUniversalLinkCallback will be executed like it should
If the app is started "fresh" this callback somehow never get triggered.
I placed the registerUniversalLinkCallback in the app component of the nativescript app.

Issue with iOS, link doesn't open the NS app

Dear @sebestindragos thank you for this plugin.

I'm building a nativescript-vue app and I can get it work for Android.
I can't get it work with iOS btw...

The AASA.json file is served correctly as a text/json file and contains one entry:

        "appID": "TEAMID.BUNDLEIDENTIFIER",
        "paths": [ "/*", "*"]

In fact, we need to hit URLs like https://www.mydomain.xyz/*

Before launching with "tns run ios" I do clear the build by removing platforms/ios to be sure everything is loaded from scratch.
After the app is prepared, platforms/ios/appname/appname.entitlements file contains the links to be parsed under the Signing & Capabilities tab.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.apple.developer.associated-domains</key>
    <array>
      <string>applinks:*.mydomain.xyz</string>
      <string>applinks:mydomain.xyz</string>
    </array>
  </dict>
</plist>

The DEVELOPMENT_TEAM key is set in build.xcconfig, too.

It doesn't work from any iOS emulator, neither from a real iPhone

Glad if you can help me, regards

Any idea how this loads in an NS Core project?

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

Problem in ios with nativescript-vue

hi, in Android is good, but in iOS error:

NativeScript encountered a fatal error: Uncaught ReferenceError: NativeClass is not defined
at
../node_modules/nativescript-plugin-universal-links/plugin-universal-links.js(file: node_modules/nativescript-plugin-universal-links/plugin-universal-links.ios.js:7:0)

Universal links are not loaded

Hey guys,

I am fighting for days with the setup but somehow it is not working.

What I have done:

  1. serve the apple-app-site-association via https://www.visual-knight.io/.well-known/apple-app-site-association
    -> here already the appsearch-validation-tool shows the json is not parsable but I can't see any error

  2. I added the appname.entitlements file to /appname/App_Resources/iOS/tipyourheronativescript.entitlements

I also checked the swcutil_show.txt

--------------------------------------------------------------------------------
Service:              applinks
App ID:               6YKDAH9HN4.org.dev-thought.tipyourhero
App Version:          1.0.9
Domain:               visual-knight.io
User Approval:        unspecified
Site/Fmwk Approval:   unspecified
Flags:                
Next Check:           0001-01-01 03:33:39 +0000

I can not find any patterns so I guess the app is not able to load the apple-app-site-association or the nativescript setup is wrong.

But I can not find any mistake... :(
I hope you guys can help me

Cheers

[2.0.2] Not triggering callback when compiling for release

Hi,

this plugin seems to be working great while developing the app, but stops working as soon as we're compiling for production.

I created a minimal example repository to show the error:
https://github.com/MrSnoozles/demo-nativescript-universal-links

Problem:
The registerUniversalLinkCallback is not evoked when compiling for release.

Steps to see how it works (in development):

Steps to reproduce the bug (in production):

registerUniversalLinkCallback not being called

I added the AASA file to my root dir and validated it which looks good.
I added the associated domain via Xcode.

The app launches correctly when i tap on a link, but registerUniversalLinkCallback is not being invoked. I tried setting a breakpoint on the console.log line below in the app.component.ts and it never gets hit and I don't see any logs in the output

package.json:

.....
"tns-ios": {
      "version": "6.1.1"
    }
  },
  "dependencies": {
    "@angular/animations": "~8.0.0",
    "@angular/common": "~8.0.0",
    "@angular/compiler": "~8.0.0",
    "@angular/core": "~8.0.0",
    "@angular/forms": "~8.0.0",
    "@angular/http": "8.0.0-beta.10",
    "@angular/platform-browser": "~8.0.0",
    "@angular/platform-browser-dynamic": "~8.0.0",
    "@angular/router": "~8.0.0",
    "@nstudio/nativescript-checkbox": "^1.0.0",
    "@nstudio/nativescript-loading-indicator": "^1.0.0",
    "@proplugins/nativescript-cfalert-dialog": "^2.0.1",
    "@proplugins/nativescript-drop-down": "^7.1.0",
    "@proplugins/nativescript-keyboardshowing": "^2.1.0",
    "base-64": "^0.1.0",
    "moment": "^2.19.1",
    "nativescript-angular": "8.0.2",
    "nativescript-background-http": "^3.3.0",
    "nativescript-barcodescanner": "^3.1.3",
    "nativescript-bitmap-factory": "^1.8.1",
    "nativescript-bluetooth": "^2.0.0-beta.27",
    "nativescript-blur": "^2.0.0",
    "nativescript-directions": "^1.1.2",
    "nativescript-drop-down": "^3.2.5",
    "nativescript-fancyalert": "^3.0.6",
    "nativescript-feedback": "^1.2.0",
    "nativescript-fingerprint-auth": "^6.2.0",
    "nativescript-geolocation": "^5.1.0",
    "nativescript-google-maps-sdk": "^2.8.1",
    "nativescript-imagecropper": "^1.0.4",
    "nativescript-imagepicker": "^7.0.0",
    "nativescript-iqkeyboardmanager": "^1.5.1",
    "nativescript-local-notifications": "^4.0.1",
    "nativescript-location": "^0.1.3",
    "nativescript-modal-datetimepicker": "^1.2.2",
    "nativescript-ng-ripple": "^2.0.1",
    "nativescript-ngx-fonticon": "^4.2.0",
    "nativescript-oauth": "^2.0.1",
    "nativescript-permissions": "^1.3.7",
    "nativescript-plugin-universal-links": "^1.0.1",
    "nativescript-secure-storage": "^2.3.0",
    "nativescript-ssl-pinning": "^1.1.4",
    "nativescript-theme-core": "^1.0.4",
    "nativescript-ui-listview": "^8.0.1",
    "nativescript-ui-sidedrawer": "^8.0.1",
    "nativescript-websockets": "^1.3.4",
    "reflect-metadata": "~0.1.8",
    "rxjs": "^6.3.3",
    "rxjs-compat": "^6.3.2",
    "tns-core-modules": "~6.1.0",
    "zone.js": "^0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "8.0.0",
    "@ngtools/webpack": "8.0.0",
    "nativescript-dev-webpack": "~1.2.0",
    "tns-platform-declarations": "^6.0.1",
    "typescript": "~3.4.5"
  }
}

entitlements file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.developer.associated-domains</key>
	<array>
		<string>applinks:www.mywebsite.com</string>
	</array>
</dict>
</plist>

app.component.ts :

registerUniversalLinkCallback(ul => {

        //never gets called
        console.log("CALLED UNIVERSAL LINK")
    });

app link not working when app is killed in Android

App link works fine except when app is killed manually or app is in background for long time (say more than 4 hours). I tried applying 'SingleTask' in manifest as per one of the blog but it is not fixing the issue.

This scenario works fine in iOS.

Example Vue

Hi , You could give an example for nativescript-vue. I don't know how to manage the link correctly

Thanks!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.