-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
adds support for getToken(string,string) and deleteToken() #1215
adds support for getToken(string,string) and deleteToken() #1215
Conversation
Many thanks for adding these methods, but could I ask that the new signatures are moved to the instanceId (iid) module? The messaging module aims to replicate the JS messaging SDK which doesn't support these advanced parameters. We created the instanceId module to allow us to include functionality that's specific to instance ID on Android and iOS. |
This is what I originally did, but the |
Yes, there is unfortunately a bit of overlap, but for the majority of use cases, the simple |
Makes sense. Just to make sure, this will mean that |
Yep, the messaging module will have |
OK - would you prefer the iid version to also support no parameters? Or have it only be the parameter version. |
Let's go with only the parameter version. |
OK - I'm having trouble getting anything to build right now, but this should work, heh. Cocoapods... |
af97d41
to
e75fdf1
Compare
Have the tests been broken in master? I'm currently unable to install cocoapods:
(tried with a fresh clone of master and following steps here) |
OK - should work now. |
fae974a
to
11fe726
Compare
11fe726
to
3652a05
Compare
This looks awesome, thank you for moving it over. Just one last thing before I can merge it in - are you able to add the Typescript typings to |
Thank you again for getting this added. |
@chrisbianca This is great and I need it too, mind creating a release for this? |
This is forcing FirebaseMessaging to be installed. Failing to compile with Core |
@bilalsyed001 hmm you're right, can see this PR adds a @ctaintor is this definitely a requirement? If so then we should probably adjust the docs to state it's dependent on messaging. Loving
|
You need to pass the apns token. You could change the native signature for getToken to accept the options and inject the apns token from elsewhere. This requires the token to be exposed in js I believe but would mean messaging is only required if you use getToken. Another option is to move these to messaging. I won't have time to do this for a while since I'm on vacation until the end of the month. |
Or you can require messaging. getToken and deleteToken are tightly coupled anyway... but I can see some value in just wanting to use the iid token. |
… until an outcome is agreed on original PR #1215
I've added support for
deleteToken()
as well as the other form ofgetToken()
. This allows for someone to request or delete FCM tokens for sender IDs other than the default senderid. I also added some tests for instanceId methods - they don't do much but at least will break if someone broke the native implementations.