I got a similar problem, the code was already implemented and working fine.
Suddenly, after some adjustments, it just don't work it anymore.
The scenario running on device was:
- Call registerForRemoteNotifications on didFinishLaunchingWithOptions.
- The didRegisterForRemoteNotificationsWithDeviceToken won't call
- nor didFailToRegisterForRemoteNotificationsWithError won't call.
I tried everything, almost reset all push configurations and certificates and provisioning profiles, etc..
All devices with the last version was working, but when I install the new version, just don't work anymore.
To solve this, I just did this:
- Went to the target capabilities;
- Turn the Push Notification Off;
- Build & Run the app on device and wait;
- Stop running the app;
- Turn the Push Notification On again.
- Build & Run the app on device;
- And like magic, it worked again
After 6h fighting with Xcode, that was my solution, without any explanation.
I hope this help someone.