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

[@nativescript/firebase-messaging-core] APNS token is no longer returned, only FCM-token #171

Open
BozzaDaniel opened this issue Jan 13, 2023 · 3 comments

Comments

@BozzaDaniel
Copy link

In release 2.5.2 the APNS-token is not available, only the FCM token is.
Even running this will return the FCM-token:

MessagingCore.getInstance().getAPNSToken()

In 2.5.1 the APNS token is returned as expected.

@mrzahidjabbar
Copy link

Facing the same issue, running firebase().messaging().getAPNSToken() for iOS device returns TypeError: Cannot read property 'APNSToken' of null.

Any solution?

@Jonathan64340
Copy link

Hello, i'm facing the same issue. I've upgraded the older firebase plugin @nativescript/firebase for @nativescript/firebase-core and @nativescript/firebase-messaging

@lano-vargas
Copy link

Same here:

aPNSToken null
Error: The operation couldn’t be completed. No APNS token specified before fetching FCM Token

Code:

let aPNSToken: string | null = firebase().messaging().getAPNSToken();
    console.log('aPNSToken', aPNSToken);
firebase().messaging().getToken().then((token) => console.log('TOKEN',  token)).catch(error => { console.log('error', error) });

There is q question though, I'm using the Simulator will it have an apnstoken should it work or only on real iPhone device?

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

No branches or pull requests

4 participants