Testing Messages with FCM Server
Whether to send and receive data with the FCM server can be tested through a test script.
Running Script/Batch File
Run test_mobile_fcm.bat for Windows and test_mobile_fcm.sh for Linux.
There are 4 arguments required and they are as follows.
apiKey: The apiKey information to authenticate to the FCM server.
deviceToken: The device token value of the client to receive the message.
messageType: It can specify the type of payload message. (data / notification)
message: The message information to be included in the payload.
$ test_mobile_fcm.bat/sh [apiKey] [devicetoken] [messagetype] [message]
messageType can be set as 'data' or 'notification' to specify the payload type.
https://firebase.google.com/docs/cloud-messaging/concept-options
You can check normal operation through the system log.
Testing Messages with APNS Server
Whether to send and receive data with the APNS server can be tested through a test script.
Running Script/Batch File
Run test_mobile_apns.bat for Windows and test_mobile_apns.sh for Linux.
There are 6 arguments required and they are as follows.
certpath: Path where the certificate is located.
password: Password for the certificate.
keyType: The type of the certificate key.
production: It is whether for production certificate and in the case of sandbox certificate, it is false.
devicetoken: The mobile device token that received the message.
message: The message to be included in the payload to be transmitted.
$ test_mobile_apns.bat/sh [certpath] [password] [keyType] [production] [devicetoken] [message]
Run test_mobile_apns.bat for Windows and test_mobile_apns.sh for Linux.
For the .p12 extension, KeyType is PKCS12.
You can check normal operation through the system log.