G-EA
G-EA

Reputation: 317

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

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!

Upvotes: 3

Views: 4001

Answers (1)

moritz.vieli
moritz.vieli

Reputation: 1807

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.

Upvotes: 1

Related Questions