We have faced the issue of push notifications working seamlessly over sandbox but never work on production. This has happened more than once.
I still have not investigated the root cause but the following fixes it.
We did not do anything extra or change any code or project build configuration. Here is what we did:
- Restored our iPhone/iPod Touch devices by erasing everything and reinstalling the OS. Did not sync the device or restore old data to avoid putting in the provisioning profiles again.
- Deleted all certificates and private keys from keychain on the mac (all including the Apple provider certificates)
- Removed all provisioning profiles from xcode.
- From the developer portal, we deleted the adhoc and dev provisioning profiles
- From the developer portal, we revoked the push SSL certificates for both dev and production versions
- Then we regenerated the push SSL certificates, both production and dev. Note that we did not download them from the wizard itself at this time.
- We then waited for a few minutes (5-10 mins) and then generated the provisioning profile. Not downloaded yet.
- We again waited a few minutes (5-10 mins) and then downloaded the certificates (sandbox and production) and the profiles (dev and adhoc)
- We then generated the single PEM file from the certificates and the key only for the production version. We did not even install the sandbox version certificates in our keychain.
- Then installed the adhoc provisioning profile in xcode and the device
- Started the application and tested a push notification
- It worked
They key difference is that we generate and download the dev profiles and sandbox certificates but do not use them at all. We only use the production certificates and the adhoc profile. That seems to always work.
November 9th, 2009 on 10:25 AM
this worked for me, iphone 3g wtih push now working http://www.simonblog.com/2009/07/09/pushfix-fixes-push-notification-on-jailbroken-iphone/
February 28th, 2010 on 8:01 PM
There is an open source PHP classes collection for APNS: ApnsPHP
With this comprehensive collection of open source PHP classes you can also easily create a Push Server with one or more (forked) processes reading from a common message queue to speed-up sending activities.
Google Code: http://code.google.com/p/apns-php/
April 6th, 2010 on 7:38 PM
Consider & Preserve your iPad for Zero cost! -> http://bit.ly/cFBuis