Chamanhm
Chamanhm

Reputation: 1080

Push Notifications on existing app. Trouble with certificates

I'm working on a large app. In the middle of development we decided to add push notifications. I created a new App ID in the Apple Developer Site.

The App ID is: 8NG823UBLP.com.mobiikk.ServicioDeAdministracionTributaria

Push is enabled for Production and Development. Certificates were downloaded for both and the .p12 created too. .p12 files are on the server and everything looks good on server side but the app is not receiving push notifications.

The app is granted push notifications and they are set to ON in settings.

The bundle ID was changed to com.mobiikk.ServicioDeAdministracionTributaria in the info.plist

The team has been looking for an answer for this without any luck. Help will be very much appreciated.

Upvotes: 2

Views: 2032

Answers (2)

PetrV
PetrV

Reputation: 1368

If you switch on notifications for existing app, you'll have to recreate the provisioning profile (better clear old profiles from Xcode organizer and then refresh them or shut down xcode and replace them via iphone configuration utility - be sure to get rid of older provisioning profiles)(you can still keep the same old appID, just refresh that AdHoc/Enterprise/AppStore profile - it contains note about being APNS-enabled)

Otherwise your serverside may look great, but app will never get successful notification of registering your device and could not pass token to your server side , but you would get failure notifications warning you about wrong entitlements and missing APNS profile in device console log

As you did not state what are you doing in the app side it's hard to tell where is your problem exactly.

Upvotes: 2

Chamanhm
Chamanhm

Reputation: 1080

Just in case someone has the same problem. The only way around this was to create a brand new project. I copied every file in the old one to the new one. Gave it a new Bundle ID, created a new provisioning profile, new App ID, and downloaded new certificates. So in summary, there was no easy way to transfer an existing project to one that accepted push notifications.

Upvotes: 0

Related Questions