Ionic 5 Capacitor: Push Notification with ONESIGNAL not working on iOS

Viewed 3337

I want to use the "onesignal" service to enable push notifications in my Ionic 5 Capacitor App.

For Android everything works fine. However, in iOS the device is registered with onesignal but it gets the message "Apns Delegate Never Fired" and its registrated as non-active user without push-subscription.

enter image description here

Many thanks!

1 Answers

I got it working like this:

  • Add the following capabilities in Xcode: Push Notifications, Background Modes -> Background Fetch & Remote notifications
  • Disable the Capacitor Push Notifications plugin by removing all "USE_PUSH" and "DEBUG USE_PUSH" compilation conditions under the targets build settings (see the plugin documentation here for more details on how to disable the plugin: https://capacitor.ionicframework.com/docs/apis/push-notifications/)
  • Test with Testflight and not directly with Xcode. I don't know why, but it only works while testing with Testflight. With Xcode, the problem persists.
Related