-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
'No APNS token specified' error getting token on iOS #221
Comments
Interesting. Having similar issue with FCM Messaging on iOS as well. My entitlements file contains the correct aps entitlement: <key>aps-environment</key>
<string>development</string> await firebase().messaging().registerDeviceForRemoteMessages()
.then((resolved) => {
console.log("FCM Register Device Result: ", resolved);
},(error) => {
console.warn("FCM Register Device ERROR: ", error);
}); Keep getting error on the registerDeviceFroRemoteMessages call. After taking a look at the .entitlements file under platforms/ios, the aps entitlement is now missing. So it seems that our custom entitlements are not being merged. |
What is the name of the entitlements file located at "App_Resources\iOS"? Make sure it is "app.entitlements". |
Correct. I had to rename it to app.entitlements 👍 now its merging during build and the device is being registered with fcm. |
Getting same error when updating the plugin to the latest .. I had already |
Try to accept the licence agreement changes .. make a fresh install .. that worked for me |
it seems that you need to add this to you
|
I'm migrating my project to use the new firebase plugins and am receiving this same error message. I've included all the items listed above. This was working with the older plugin, so I have the APNS key defined in the firebase console. The specific error message is
|
@dlcole |
@kefahB I tried that and noticed this error:
I'll generate a new provisioning profile and see if that does the trick. |
@dlcole this is another issue now, you should generate a new provision profile with the UIBackgroubdModes then install it |
@kefahB Well, still no luck. I edited my ID to check the capabilities. I have Associated Domains and Push Notifications checked. I didn't see anything else pertinent. While chasing this issue I had earlier added these lines to my app.entitlesments file:
I commented-out these lines, cleaned and ran, and still received the same APNS error message. Any suggestions for next steps? |
It is a known issue on Xcode, open your project with Xcode and toggle 2 times Automatic configuration and build even if Xcode show an error msg about the profile |
@kefahB - OK, I'm game, just trying to understand what you're suggesting. I don't see "Automatic configuration" as an option anywhere. I did toggle "Background processing" several times, built, and ran on an iOS emulator from Xcode and received the same APNS error. I'm running Xcode 14.3. |
Upon further testing I have found that adding
to info.plist is sufficient to bypass the APNS error on iOS devices, but not iOS emulators. BUT, I have also found that this changes causes a hang in the login process. In particular,
yields this sequence:
Might some type of Firebase AppDelegate be required for phone authentication? I'll open a separate issue for tracking. |
You may try to edit the delegate to set manually the apns token applicationDidRegisterForRemoteNotificationsWithDeviceToken(application: UIApplication, ´´´ |
Same issue here but on Simulator, Should this works on Simulator at all? |
You'll always see this error on a simulator. |
Ok... I've found out that it actually the messaging doesn't work on Simulator.
It state here : https://docs.nativescript.org/plugins/firebase-messaging.html#intro |
This issue can occur if you are not having the provision profile you created from Apple Developer account. You need have those installed in the system you're working. |
Guys, I need help related to this question. No matter what I do, regadless of wha i select https://developer.apple.com/account/resources/identifiers/list i just can't get rid of "Provisioning profile "xxx" doesn't include the UIBackgroundModes entitlement.". BUT, there is physically no such item "Background Modes" or alike. `i killed the entire day on this, please help! PLEASE! |
I have an issue using this plugin on iOS. I receive this error when trying to get Firebase token:
No APNS token specified before fetching FCM Token
I put GoogleService-Info.plist and app.entitlements in app/App_Resources/iOS as described in the documentation
I tried both with xcode 14.3.1 and 15.0-beta
these are the dependencies in package.json:
And this is the function called when the application is started:
This is the console output:
I seem to have done everything that is requested in the documentation. Any idea?
EDIT:
I tried to wrap the
registerDeviceForRemoteMessages
call in a try-catch statement. No exception is thrown, but after that, the registration status, checked withfirebase().messaging().isDeviceRegisteredForRemoteMessages
, is falseThe text was updated successfully, but these errors were encountered: