Skip to content

iOS Error: No APNS token specified before fetching FCM Token #7329

Answered by gz1992
gz1992 asked this question in Q&A
Discussion options

You must be logged in to vote

Found it... As FCMToken is related to the user device, when I changed my certificate on firebase, some users that couldn't update their token couldn't access my platform. It is important to mention that the users had permission but couldn't get token

messaging().hasPermission().then(permission => {})

As a result, I needed to force the registration of their device by:

await messaging().registerDeviceForRemoteMessages();
return messaging()
    .getToken()
    .then(token => token)

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@hadanghuy
Comment options

@tuannha01
Comment options

@gz1992
Comment options

Answer selected by gz1992
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants