FCM silently fails on iOS


#1

I started a new app just to test this feature so I’m using the latest everything.
I’ve followed the directions found in the Ionic docs, as well as the docs for the original Cordova plugin.
My certificates and provisions are set up and not showing any errors.
I’ve enabled Push Notifications in Xcode Capabilities.
Everything compiles and runs just fine.
The app is able to get a token but subscribe does not work.
I’ve gotten this working perfectly in Android but it fails without error in iOS.

What I’ve tried:

  • The plist file from Firebase gets corrupted when it gets moved into the iOS project so I copied it manually.
  • Turned on “Allow HTTP Services” under Developer Settings on my device.
  • Enable keychain sharing under Xcode Capabilities.
  • Added the app id prefix to firebase.
  • Uploaded an APN key to Firebase.
  • Set FirebaseAppDelegateProxyEnabled to NO in my Info.plist.
  • Enabled Remote Notifications under Background Modes in Capabilities.

Do I maybe need to add Firebase to the project?
My iOS device is still on 10.3.2. Could this be it?
I’m using the latest Xcode.

My system info:

global packages:

    @ionic/cli-utils : 1.4.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.12
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.2.3 ios 4.4.0
    Ionic Framework                 : ionic-angular 3.5.0

System:

    Node       : v6.9.4
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002
    ios-deploy : 1.9.0
    ios-sim    : 5.0.11
    npm        : 3.10.10

This is my Xcode log:


#2

I’m 95% sure that my problem was not uploading the APN key to Firebase.
I think some of the other stuff I tried might have actually broken it.
After running out of things to try I nuked the project and started from scratch.
I followed the most basic steps and it worked.