0
votes

We are trying to implement push notification in our project. We were successfully able to implement it for Android and Windows but are unable to do so for iOS.

The device is registered successfully for push notification and can see the device in Worklight console but when we send the notification we get the following error.

[ERROR   ] Couldn't send message after 3 retries.Message(Id=2; Token="token"; Payload={"aps":{"alert":{"body":"gdf g dfg dfg","action-loc-key":null},"sound":"","badge":1},"payload":"{\"alias\":\"myPush\",\"custom\":\"data\"}"})
Remote host closed connection during handshake
[ERROR   ] FPWSE1083E: Failed to send APNS notification with identifier 2, device token: "Token"
Remote host closed connection during handshake

After some time I get this error

[WARNING ] Failed to retreive invalid devices
javax.net.ssl.SSLHandshakeException: Remote host closed connection during       handshake
[WARNING ] Failed to retreive invalid devices
javax.net.ssl.SSLHandshakeException: Remote host closed connection during     handshake
[WARNING ] Failed to retreive invalid devices
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
[ERROR   ] Couldn't get feedback connection
javax.net.ssl.SSLHandshakeException: Remote host closed connection during     handshake
[ERROR   ] Unknown exception: javax.net.ssl.SSLHandshakeException: Remote     host closed connection during handshake
Unknown exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
1
Your payload is incorrect. you need to use specified payload for APNS as defined by apple guidelines. Refer Examples of JSON Payloads section in apple documentation for more details.Dipen Panchasara
thanks Dipen but the payload is created by the adapter function.which is provided in the sample app for worklight push notificationxoanon
are there any other settins that we need to do to send the messagexoanon

1 Answers

1
votes

This error is caused due to incorrect .p12 file. Please take a look at this thread.