Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(@capacitor/push-notifications): Add common issue about iOS simulator support and device tokens #2025

Open
matthewbal opened this issue Feb 7, 2024 · 2 comments · May be fixed by #2026
Labels
type: bug A confirmed bug report

Comments

@matthewbal
Copy link

matthewbal commented Feb 7, 2024

Feature Request

Plugin

  • push-notifications

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 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.

Additional Context

https://stackoverflow.com/questions/1080556/how-can-i-test-apple-push-notification-service-without-an-iphone/60085404#60085404

@matthewbal
Copy link
Author

aha, I just saw this comment:

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 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
@IT-MikeS IT-MikeS added the type: bug A confirmed bug report label Feb 23, 2024
Copy link

ionitron-bot bot commented 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.

@IT-MikeS IT-MikeS removed the triage label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed bug report
Projects
None yet
2 participants