Skip to content
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

feat: add method to get fcm token #2369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yousrasd
Copy link

@yousrasd yousrasd commented Jun 16, 2023

  • Implement a method to retrieve the FCM token upon request. I require this functionality in my app as I only need to obtain the FCM token once when the app is opened. I prefer not to use the onRegister method as it triggers continuously.

Goes with the following PR in react-native-push-notification/ios: react-native-push-notification/ios#410

@jedabero
Copy link

Why not use onRegister passed to the configuration options?

PushNotification.configure({
    requestPermissions: true,
    onRegister: ({ os, token }) => {
      // use token
    },
}):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants