<FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
I've double and triple-checked that my Firebase project is set up with the correct APNS certificates and verified that my application is provisioned properly to receive push notifications (by manually sending a message to APNS). I've tried all of the setup guides and enabling/disabling AppDelegate swizzling, but I'm never getting the kFIRInstanceIDTokenRefreshNotification so that I can get a FCM InstanceID. The API docs mention more detail about error codes "down below", but I can't seem to find anything that would point me in the right direction for what a "1001" error might mean.
Anyone have any ideas?
com.firebase.iid.notif.fcm-token" that contained a token that I was able to use to successfully send a push notification to my device via the FCM Console. Following that track I tried deleting and reinstalling the app on my device and when I agreed to allow push notifications the kFIRInstanceIDTokenRefreshNotification event was finally fired to allow me to grab the FCM token.
This seems problematic for anyone who has already set up their app to use push notifications, as the user has already agreed (or disagreed) to allow notifications so we'll never have a chance to grab and save off the FCM token. Is it safe to listen for the notification mentioned above to grab the token or is there some other method we should be using to safely obtain and store the FCM token for a user?
2016-06-09 12:12:47.758 myPhotoCalendar[1674:] <FIRAnalytics/INFO> Firebase Analytics v.3200000 started
2016-06-09 12:12:47.759 myPhotoCalendar[1674:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2016-06-09 12:12:47.764: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-06-09 12:12:47.768: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2016-06-09 12:12:47.776: <FIRMessaging/INFO> FIRMessaging library version 1.1.0
2016-06-09 12:12:47.784: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-06-09 12:12:47.783 myPhotoCalendar[1674:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2016-06-09 12:12:47.821 myPhotoCalendar[1674:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-06-09 12:12:48.086: <FIRInstanceID/WARNING> APNS Environment in profile: (null)
2016-06-09 12:12:48.086: <FIRInstanceID/WARNING> No aps-environment set. If testing on a device APNS is not correctly configured. Please recheck your provisioning profiles. If testing on a simulator this is fine since APNS doesn't work on the simulator.