-
Notifications
You must be signed in to change notification settings - Fork 678
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
getAPNSToken always returns null except right after registration #510
Comments
I found out what happened.
|
fixed |
I'm using the RN 46 and react-native-fcm 7.5.1. Everything works for me in terms that I can get the fcmToken and I can send push messages to ios devices withe the fcmToken. But I'm having trouble to get the apns token from this library.
I have code like this
FCM.getFCMToken()
.then((token) => {console.log('token '+token);})
FCM.getAPNSToken()
.then((apnstoken) => {console.log('apnstoken '+apnstoken);})
For the first time app runs and receives user's permissions for notification, the apnstoken is a valid string. Once the app is killed and restarted, it always gives undefined value for apnstoken.
The text was updated successfully, but these errors were encountered: