2015-09-16 37 views
0

我們正試圖在我們的項目中實施推送通知。我們成功地爲Android和Windows實現了它,但無法爲iOS設計。無法將推送通知發送到IBM Worklight應用程序中的iOS設備

設備已成功註冊推送通知,並且可以在Worklight控制檯中看到該設備,但是當我們發送通知時,我們會收到以下錯誤消息。

[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 

一段時間後,我得到這個錯誤

[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 
+0

您的「有效載荷」不正確。您需要使用Apple指定的APNS指定的有效負載。有關更多詳細信息,請參閱[apple文檔](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html)中的「JSON有效內容的示例」部分。 –

+0

感謝Dipen,但有效載荷是由適配器函數創建的,它在示例應用程序中爲工作燈推送通知提供了 – xoanon

+0

是否還有其他設置需要我們發送消息 – xoanon

回答

1

導致此錯誤是由於不正確.p12文件。請看看這thread

+0

Abhinav它仍然不能使用上述方法。 – xoanon

+0

您可以仔細檢查您是否使用開發人員配置配置文件,而不是企業配置配置文件。 @vishalsahani – Abhinav

+0

已檢查我們是否使用開發人員配置文件 – xoanon

相關問題