When attempting to implement Firebase Cloud Messaging into my application, I am receiving the following error at runtime:
I am receiving an FCM token, so it appears to be establishing a connection with firebase. I have read many suggestions on what the problem could be, many seem to indicate that there is a problem with my provisioning profile not allowing push notifications. I have checked these settings under "Signing & Capabilities" and it appears that the profile allows for push notifications, and has the aps-environment value in the entitlements section:
Is there something else I'm missing?
Here is my development environment:
I finally found the answer. Although my provisioning profile states that I have the aps-environment entitlement, and that I have Push Notification capability included, I STILL had to enable push notifications manually in the project. Additionally, the Background Modes (Remote notifications) capability needed to be added as well. These menus have changed in recent versions of xcode (for instance, the capabilities menu is now called signing and capabilities, and the add capability button is nestled up above all the settings).
In Xcode 11.5, follow these steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With