EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 446 forks source link

How I can dynamic links on nativescript on iOS? #282

Open nnieto opened 7 years ago

zoeitsolutions commented 7 years ago

Bump.

I would also like to incorporate dynamic links using firebase:

https://firebase.google.com/products/dynamic-links/

kilka commented 7 years ago

With the addition of Firebase Invites with 3.12.0 are dynamic links now possible? I see deeplinks are supported in invites.getInvitation(), is there plans to add dynamic links in the near future as well? Would love to be able to pass along a parameter in the install link via dynamic links.

dbeulen commented 7 years ago

I'm trying to implement this functionality, but i could use some help. For now i'm looking into android only, as i don't have a IOS device available for testing.

The code to receive dynamic links is available here: (WARNING, very rough, definitely not usable for production!) https://github.com/dbeulen/nativescript-plugin-firebase/commit/18507deaae70a66b28a95981ffa6177d10d81f17

Im using an anonymous function because i need the intent that started the application. But now the code is only run when the application is started. If the user clicks a link while the application is in the background the code is not triggered.

Is there a different way in retrieving the intent? Or do i have to save the intent in a variable so I can use it later?

dbeulen commented 7 years ago

Okay, I finished the code for receiving a Dynamic Link for android. Used a callback so the dynamic-links also work when the application is already running in the background.

Code is in this pull request above