Push Notification not working in development - ios

Can't make push notification work with development certificate. I successfully register for push communication, but the push from server never comes. With production certificate works. Any hints?

When working with debug builds, you must use gateway.sandbox.push.apple.com as your APNS gateway, instead of the production one.

Related

Push notifications not receiving/working for AppStore and TestFlight build

As one of our iOS applications is UNABLE to receive push/remote notifications for production/live build which installed from App Store/TestFlight but able to receive push/remote notifications in development environment and even in production environment also app is able to receive push/remote notifications from third party services like Gimbal (which is in sync with Urban Airship) but not receiving in app notifications which triggered from our servers using Java code base.
We have cross checked
Push notifications permissions in iOS devices
Device token registration/update in our databases.
All ports which are needed for APNS are open in our servers firewall restrictions.
All the .p12 certificates which we are using for development and production are not expired and even we are able to send/trigger these push/remote notifications manually from third party portals(like pushtry.com website, NWPusher) by using the same .p12 certificates even in production environment to live build installed from App Store/TestFlight.
Need help/suggestions in this issue???
Thanks
I would suggest to check the host and port used in your server for production push notification.
I hope you are removing the sandbox from the host for production push notifications.

Push notification is not received in Testflight

Im trying to implement Apple Push notification.
It is working fine in Local environment. But it is not working in test flight.
I have got Automatic signing enabled.
I have included the APNS entitlement file in my build with Key APS Environment and Value Development.
I have used both of the following urls in my server,
Sandbox: gateway.sandbox.push.apple.com, port 2195.
Production: gateway.push.apple.com, port 2195.
But still the push notification is not received from testflight mode. Why so?
Since your push notification is working fine on development but not on test flight.
You should check these as below:
Use the production SSL certificate to generate the .pem file on your push server when your app is using test flight.
Make sure your pem file and device token is right on your push server

Send push message to apple sandbox

I'm currently working on push notification workflow developed by another developer of my company.
I have a question about the sandbox for push notification.
I have generated a .pem for my production environment.
I have tested id with openssl as describe in this tutorial.
When i make the test to gateway.sandbox.push.apple.com url, the connection is ok even though i don't use the developement key and cert files (i use the prod file).
If i build and send push message to gateway.sandbox.push.apple.com with my prod pem file, the message will be send to the prod devices or dev devices ?
There's no such thing as a production device or a development device. There are devices with either a production build or a development build of your application.
You can only send a push to a development build of your app using the development environment, and likewise you can only send a push to a production build of your app using the production environment.
Production and dev builds are signed using different profiles, and this results in the push token that your app obtains being different, if you try to send a push using the sandbox environment but using a production push token then it will be rejected, and similarly attempting to use the production environment with a dev push token.
You need to set your gateway proper, use the proper PEM whether Dev PEM or Dist PEM. Xcode needs Dev profile and certificate to run and test with Dev PEM

Push notifications not working in production mode

I am implementing push notifications, it's working in development mode.
In production mode, when I run the application I get this message in Xcode but the application installs on the device.
launch failed: failed to get the task for process 11288
After opening the app on device I get token id, but not get the notification, when I run simple.php file in terminal I get message as
connected to APN
Message successfully delivered
I have used AdHoc production provisioning certificate to test the application.
Can you tell me how to test push notifications in production.
You need to use a production push certificate, which you can generate the same way you do with a development certificate (just choose production), as well as change your server address from gateway.sandbox.push.apple.com to gateway.push.apple.com...
EDIT: You are not allowed to debug production apps, which is why you get that Xcode error in production mode...
First, You get the following error
launch failed: failed to get the task for process 11288
Because, you are running app in Production (adhoc/distribution/release) scheme mode.
Second,Your pem file and its password should be correct. Also make sure you are using the correct gateway for Production.
We could help you more, if you can share your server file here.
Thanks

Apple push notification server on Amazon EC2 connected but not receive notification

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!
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.

Resources