问题
Is possible to test fcm iOS push notification in simulator or can I convert fcm push notification json format to apns format for testing in simulator?
回答1:
Yes you can test push notifications on the simulator if using Xcode 11.4 or higher.
“Simulator supports simulating remote push notifications, including background content fetch notifications. In Simulator, drag and drop an APNs file onto the target simulator. The file must be a JSON file with a valid Apple Push Notification Service payload, including the “aps” key. It must also contain a top-level “Simulator Target Bundle” with a string value matching the target application‘s bundle identifier.
来源:https://stackoverflow.com/questions/62356656/how-to-test-fcm-push-notification-in-simulator-for-ios-xcode-11-4