So I have added push notifications to my app, everything was working fine in development when i was trying it out, then I switched over to production and was ready to upload to app store, suddenly push notifications were not being sent anymore. I have no idea what to do, any help?
Also, when I run the app, the device is successfully registering for push notifications, but no notifications are being sent or received.
Check that your app is ready to receive notifications from your production url and it's not still set to the sandbox one.
Development: Use the development environment for initial development
and testing of the provider app. It provides the same set of services
as the production environment, although with a smaller number of
server units. The development environment also acts as a virtual
device, enabling simulated end-to-end testing. You access the
development environment at gateway.sandbox.push.apple.com, outbound
TCP port 2195.
Production: Use the production environment when building the
production version of the provider app. Apps using the production
environment must meet Appleās reliability requirements. You access the
production environment at gateway.push.apple.com, outbound TCP port
2195.
Also make sure your app is using your Production APNS certificate.
Related
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.
I use p8.
Please more information why we have to set APS Environment with production before that I set it with development it is working
Where does your server sends push requests to: Production or Sandbox?
Your app configuration should match with what the backend is doing.
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
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
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