Apple push notification server on Amazon EC2 conne

2019-05-10 08:27发布

问题:

I tried the apple push notification API and made it work on my local mac(environment). I tested it in my local tomcat, everything works fine and iOS devices receive notifications as excepted.

But when I deploy my war into the tomcat at remote server( Amazon EC2 instance), noted that I use the same .p12 file for verification. The application returns a successful message but the iOS devices could not receive any messages.

I checked the connection with Apple push server, everything seems fine.

I am wondering if I missed any other system set up for this Amazon EC2. The same code works on a tomcat on windows machine as well.

Thanks!

回答1:

I have verified that sending a push notification from ec2 through Apns works great. I was having trouble, but it turned out to be using a cert for the wrong app and it failed silently. If you have trouble connecting then check firewall. If it is saying that it sends successfully but there is no delivery then eliminate variables in your certs.