-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
FR: Support iOS 16 Simulator on Firebase Messaging #9968
Comments
Thanks for the feature request. From the Xcode 14 Release notes: Simulator now supports remote notifications in iOS 16 when running in macOS 13 on Mac computers with Apple silicon or T2 processors. Simulator supports the Apple Push Notification Service Sandbox environment. Your server can send a remote notification to your app running in that simulator by connecting to the APNS Sandbox (api.sandbox.push.apple.com). Each simulator generates registration tokens unique to the combination of that simulator and the Mac hardware it’s running on. See User Notifications for more information. Remote Notifications support more features (like Notification Service Extensions) than locally simulated notifications using .apns payload files or the simctl push command. Device Registration Tokens are of variable length. Tokens in Simulator may be larger than current physical device tokens. Don’t hardcode any specific length or format for these tokens. (60974170) |
If you are interested about a temporary workaround, while we wait for this to be implemented, you can do the following:
GULAppEnvironmentUtil+SimulatorPN.h
GULAppEnvironmentUtil+SimulatorPN.m
Run your app in the Simulator and you will be able to receive push notifications from Firebase in the Simulator. Keep in mind that the solution should only be applied when running in simulator. |
Hi, Thank you |
No idea, but the solution is using method swizzling. You can check if this can help you. |
Feature proposal
Trying to test remote notifications via Firebase Messaging on an Apple Silicon Mac with macOS Ventura and Xcode 14.
Getting this log message:
2022-06-30 15:56:00.487199+0300 my-project[75680:3976914] 9.2.0 - [FirebaseMessaging][I-FCM023014] Running InstanceID on a simulator doesn't have APNS. Use prod profile by default.
And notification sending fails with this error:
"errorCode": "UNREGISTERED"
The proposed change is to support iOS 16 simulators.
The text was updated successfully, but these errors were encountered: