Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants