1
votes

I have developed a simple application that uses APNS. The app runs fine and receives notifications when i used my host for php but its not receiving Notifications when i send the php code with certificate to a person who is in another country. he then executes the apns php code on its side but the iPhone app does not receive any Notifications. Its giving error of primary key in php code.

I have followed this tutorial http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12

Please help.

4

4 Answers

0
votes

To use your certificate on another server you should import your private key and install it on that server. If it won't be installed then second server couldn't use certificate that you are using to connect to APNS.

I think, you have forgotten to do this.

0
votes

I've used Boxed Ice's awesome guide which walks you through exporting your certificate and private key and getting it into a format that PHP can use to communicate with APNS. It works perfectly.

0
votes

Does your pem file contain private key as well?

0
votes

I have figured out the solution of my problem, its was the issue of pass phrase. On server side we have to enter the pass phrase while adding .pem file to server.