I have tried for Firebase Push notification but its not working. Remote message is displaying on console with payload but not showing the notification on simulator. I using Xcode 11.5 and iOS 13.
You can follow this article for testing push notifications in the simulator. For testing remote notifications that is sent directly from firebase you will need a physical device. I am using xcode 11.6 and during the registration process it is showing a message in the console: Error! iOS Simulator does not support push! Please test on a real iOS device. remote notifications are not supported in the simulator
Here is the summary for testing push notification in simulator:
Register for push notifications and make sure you allow it.
Create a file named: test_push_notification.apns
Add and save the following JSON in the newly created file just by replacing bundle identifier as per your app.
{ "Simulator Target Bundle": "com.yourapp.bundleid", "aps": { "alert": { "title": "Push on the simulator", "subtitle": "Test push notification", "body": "This notification will show up in the simulator!" } } }
Open terminal and navigate to the directory where you saved the file.
Run this command xcrun simctl push booted test_push_notification.apns