You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a short section into the readme to let developers know that the iOS simulator does not support push notification registration.
I spent too long trying to figure out why the registration and registrationError listener events were not firing for me, and it turns out that for me, on Xcode 14.2 with an ios 16.1 simulator, the failure is totally silent and simply doesn't fire the event didRegisterForRemoteNotificationsWithDeviceToken or didFailToRegisterForRemoteNotificationsWithError in the appdelegate (confirmed with print statement debugging).
I confirmed that my project works fine on a physical device, so it is indeed only the iOS simulator which doesn't support registering a device token.
Platform(s)
Docs only
Preferred Solution
Adding the section into the readme.
Alternatives
There might be a way to detect if the user is in a simulator and throw an error to the registrationError event.
With macOS 13 and Xcode 14, when on Mac computers with Apple silicon or T2 processors, it’s now possible to receive real push notifications as didRegisterForRemoteNotificationsWithDeviceToken will return a real token.
I will edit the wording of my PR to mention this.
IT-MikeS
changed the title
Add common issue to push-notifications/README.md about iOS simulator support
docs(@capacitor/push-notifications): Add common issue about iOS simulator support and device tokens
Feb 23, 2024
This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.
Feature Request
Plugin
Description
Add a short section into the readme to let developers know that the iOS simulator does not support push notification registration.
I spent too long trying to figure out why the registration and registrationError listener events were not firing for me, and it turns out that for me, on Xcode 14.2 with an ios 16.1 simulator, the failure is totally silent and simply doesn't fire the event
didRegisterForRemoteNotificationsWithDeviceToken
ordidFailToRegisterForRemoteNotificationsWithError
in the appdelegate (confirmed with print statement debugging).I confirmed that my project works fine on a physical device, so it is indeed only the iOS simulator which doesn't support registering a device token.
Platform(s)
Docs only
Preferred Solution
Adding the section into the readme.
Alternatives
There might be a way to detect if the user is in a simulator and throw an error to the registrationError event.
Additional Context
https://stackoverflow.com/questions/1080556/how-can-i-test-apple-push-notification-service-without-an-iphone/60085404#60085404
The text was updated successfully, but these errors were encountered: