Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Push Notifications not working with Development certificate

Situation: we have PROD and DEV APN certificates installed on different backend URLs. PRODUCTION certificate works!: pushes are delivered.

DEV certificate does not work, apple servers return error code 7 (invalid token). I have already checked all the stuff but may be I'm still missing something.

  • app id is correct (same used for prod)
  • i use right backend (with DEV certificate installed)
  • I start the app from XCode in DEBUG mode (corresponds to DEV environment)
  • I use proper app development certificate, from the same account
  • I use proper dev profile (pushes are supported in it)

Should actually work, right?

like image 863
Arnie Schwarzvogel Avatar asked Oct 31 '22 21:10

Arnie Schwarzvogel


1 Answers

In case of IOS 9, please send notifications from Apple Production Push notification certificate, it will work.

Make pem file from Production APS certificate, and use this file both in development as well as production mode.

Moreover, use gateway of production in both cases which is "gateway.push.apple.com:2195"

Don't use "gateway.sandbox.push.apple.com:2195" even if you are sending notifications in development mode.

like image 174
Ghulam Rasool Avatar answered Nov 09 '22 13:11

Ghulam Rasool