Reputation: 2160
I have implemented APNS in my iOS application project (by following Ray Wenderlich's tutorial).
After installing app on my device I am getting an alert that "AppName" would like to send you Push Notification". press "OK" or "Don't allow"
. I pressed OK.
Now after running code I successfully get device token and then send that device token to my server.
The server guy is saving my device token and sends me a push message, and then he is getting message message sent successfully
, but my device is not receiving any message.
It's really becoming difficult for me to figure out where I am going wrong. Some say your certificate might be corrupt. If my certificate is corrupt then how is my app getting a device token?
I am using iPhone3GS(iOS6) device (I know it's really old model). I have been trying to figure this out for more than a week, but no success. So guys I need your help to figure where I am going wrong. Thanks
Upvotes: 1
Views: 110
Reputation: 394136
The app doesn't use the certificate in order to register to APNS and get a device token. Only the server uses the certificate. Therefore it is possible the certificate is corrupt or expired.
It's also possible the server is trying to push to on push environment (sandbox or production) while the app was built with a provisioning profile that contains push entitlements for the other environment.
In addition, make sure the certificate being used by the server belongs to the same push environment that the server is connecting to.
Upvotes: 1