Unable to register iOS push notifications

Registering for remote push notifications works fine and the user gets asked for permission.

Afterwards I never receive the device token, it always stays null with not error message whatsoever.

After debugging the XCode project, I noticed that the delegate method “didRegisterForRemoteNotificationsWithDeviceToken” never gets called. So I tripple checked all the XCode setup is correct: Provisioning Profile, Capabilities, everything is correct.

Then I created an empty Swift project with the exact same setup and bundle id. The only code I added was for registering for push notifications. It worked great instantly with the exact same device.

So I wonder if there is something in the XCode project setup that Unity3D does wrong? Has anybody had this problem or any ideas what else to look for??

Have just checked in my project and this is working fine for me. Method didRegisterForRemoteNotificationsWithDeviceToken does get called. However I have seen problems like this before and the reason was because I had 2 third-party plugins in the project which both defined their own AppController subclass and one was being ignored.