简体   繁体   中英

Sending iOS Push Notifications In PHP With the New Version of the Protocol

I've been trying desperately to get my PhoneGap application to work with iOS push notifications and I'm using the SimplePush code from this site ( http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 ). It says the message was sent successfully but nothing shows up on my device.

It looks like the new version ( https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html ) of the protocol actually has some feedback on if the message went through or not (the old version will say it's successful even if the binary notification is malformed). Has anyone seen an example of how to send push notifications using this new version in PHP? All the examples I've found online use the old version (and they have the same spacing 90% of the time so I'm guessing it's just copy and pasted from the same source :-)).

I've seen the successful response happen without the notification actually being sent to the device when my .pem and certificates were not readable. Are your .pem and entrustxxxxx.cer files accessible and readable by your notification script?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM