【发布时间】:2011-06-03 08:02:00
【问题描述】:
我可以在服务器上成功运行 APNS。我收到这条消息:
Fri, 03 Jun 2011 10:01:41 +0200
ApnsPHP[29402]: INFO: Trying ssl://gateway.sandbox.push.apple.com:2195... Fri, 03 Jun 2011 10:01:42 +0200
ApnsPHP[29402]: INFO: Connected to ssl://gateway.sandbox.push.apple.com:2195. Fri, 03 Jun 2011 10:01:42 +0200
ApnsPHP[29402]: INFO: Sending messages queue, run #1: 1 message(s) left in queue. Fri, 03 Jun 2011 10:01:42 +0200
ApnsPHP[29402]: STATUS: Sending message ID 1 [custom identifier: Message-Badge-3] (1/3): 167 bytes. Fri, 03 Jun 2011 10:01:43 +0200
ApnsPHP[29402]: INFO: Disconnected.
但是当我在设备上运行应用程序时,我没有收到推送通知。我已经编写了所有代码并创建了entitlement.plist 文件。
谁能帮我解决这个问题?也没有调试错误。
非常感谢任何帮助。
谢谢,
安克斯
【问题讨论】:
-
这个小信息很难知道。这可能是无效的负载(消息、设备令牌、长度...),或者您使用的证书无效,甚至是您的应用程序中的错误实现。发送推送时无需运行应用程序,因为它不会显示任何内容,但既然这样做了,请检查是否调用了 didReceiveRemoteNotification。
-
didReceiveRemoteNotification 没有被调用。如果证书本身无效,我认为服务器不会显示成功消息。
标签: php iphone push-notification apple-push-notifications