After upgrading to iOS 18, in my app development using xCode 16.0 (16A242d) and Swift, I am totally unable to obtain an APNS token from my own device using didRegisterForRemoteNotificationsWithDeviceToken
The delegate simply won’t fire.
I was able to do so repeatedly in the same app a week earlier, using iOS 17xx. That part of the code has not changed.
I just now restored my phone and installed a clean version of iOS 18, but the issue has not changed.
Have tried using WiFi and also cellular networks.
It is a no-go.
It was the Firebase/Firestore Library!
In summary, the Firebase/Firestore functions are running asynchronously, totally destroying the timing of the APNS delegate functions. Turn Firebase/Firestore off, and APNS works again.
We will retrieve the APNS token before any Firebase/Firestore functions are engaged.