As some of you may know, Xcode version 11.4+ finally support testing notifications inside simulator. We can test by dragging an .apns file to simulator, or running the below command:
xcrun simctl push <DEVICE_ID/NAME> ./notification-test.apns
The structure of .apns file will be as following:
{
"Simulator Target Bundle": "com.example.app",
"aps": {
"alert": {
"title": "Testing notification with APN file",
"body": "Click this message to open the app!"
},
"badge": 1,
"mutable-content": 1,
"sound": "default"
}
}
Now I am testing my React Native app which listen to notification from firebase messaging.
I would like to test the data inside notification message but is not working.
How could I achieve a testing notification simulating as from firebase messaging, so that messaging().getInitialNotification() or other firebase functions could catch?