I am developing push notifications for an app of mine, I wrote the provider in PHP and it works fine. I was previously testing the push notifications with my dev builds and the sandbox server from Apple and everything worked fine, now I am trying to get it to work with an AdHoc build but I never receive any messages on the phone. Here is what I did:
- Enable production push notifications for the App, create the certificate, download it, create the PEM following the instructions here and upload it to my server. Configured my PHP Script to use gateway.push.apple.com and port 2195 for the connection and test it, the connection to the server works as expected.
- The Layout of the payload is the same as with the dev and writing to the stream works
- After activating Production APN I recreated my AdHoc provisioning profile and verified after the build that in the entitlements aps-environment is set to "production" (which it is)
- Installed the App through AdHoc on a device which has not run the app before, I get asked whether to allow PNs, click yes and my server receives the token just as it should.
- Tried to send a message (which should get send to 3 devices) through the production environment. There is no error when connecting to Apple or sending the data but I do not receive a push notification on any of the devices.
I am really out of ideas what could be wrong, does anybody have an idea? Thanks a lot!