问题描述
- ios javawpns推送问题
-
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) ~[na:1.8.0_11]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343) ~[na:1.8.0_11]
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:728) ~[na:1.8.0_11]
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) ~[na:1.8.0_11]
at java.io.OutputStream.write(OutputStream.java:75) ~[na:1.8.0_11]
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:402) [JavaPNS-2.2.jar:2.2 r000]
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:350) [JavaPNS-2.2.jar:2.2 r000]
at javapns.notification.transmission.NotificationThread.runList(NotificationThread.java:228) [JavaPNS-2.2.jar:2.2 r000]
at javapns.notification.transmission.NotificationThread.run(NotificationThread.java:199) [JavaPNS-2.2.jar:2.2 r000]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505) ~[na:1.8.0_11]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:954) ~[na:1.8.0_11]
... 9 common frames omitted以上是异常信息,哪位大声帮给看看
解决方案
首先注册通知:
=.=在iOS8中注册通知的方式略有不同如下代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//注册通知
if ([UIDevice currentDevice].......
答案就在这里:ios 推送 问题
时间: 2024-09-20 07:47:26