Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test production push notifications?

Until now I used development push certificate and the push notifications worked great.

Now I want to submit my app to Apple so I created a production certificate and set it under "code signing identity" -> "Release"

I also placed the .p12 file in my production server.
But the push now does not work.

Is it suppose to work when I run from xcode? or will it just work when downloading the app from App Store? If so how can I test it?

like image 905
Eyal Avatar asked Sep 16 '12 12:09

Eyal


People also ask

How do I test push notifications locally?

Sending a test Android push notificationClick on Settings and open Mobile Apps. Click on the Android App and make sure the Firebase API key has been configured. Click on Test Push and enter the device token for your test device. Add a test payload and send the test.

Can I test push notifications iOS simulator?

“Simulator supports simulating remote push notifications, including background content fetch notifications. In Simulator, drag and drop an APNs file onto the target simulator. The file must be a JSON file with a valid Apple Push Notification Service payload, including the “aps” key.


2 Answers

You can test APNS production environment building an AdHoc version of your App. The app will be using the production certificates and servers and it's purpose is exactly to test BEFORE you send it to AppleStore.

Take a looke at this link: what kind of certificate do I need to test apns using ad-hoc distribution?

like image 177
Trinca Avatar answered Sep 19 '22 23:09

Trinca


The production push will work when you download the app from the App Store.

UPDATE:
You can also test the production push with an AdHoc build of the app; see Trinca's answer.

UPDATE:
Now, the easiest solution is to use Apple's TestFlight. (In TestFlight, it is easy to add new remote users, sending them an email invitation, they then download on whatever device they choose.)

like image 36
FrediWeber Avatar answered Sep 18 '22 23:09

FrediWeber