Test iOS Test iOS - 1 year ago 126
iOS Question

Device token Changing after exported as ipa

Hi Everybody i'm working with Apple Push Notifications for my app here i'm struggled with Device token issues & not getting Notifications.

i successfully created a .p12 key then i uploaded in Amazon SNS it working good and i'm receiving notifications also.

ISSUE Not getting notifications for exported ipa.

When i run with xcode it giving some device token(ex. xxx1111).after i uninstalled the old one,i exported as ipa,& uploaded in diawi.com then run it in same device it gives some different device token(ex. yyy2222). now i copied that new device token(yyy2222) into Amazon SNS with same .p12 key only, now i'm not getting any notifications.

But i deleted the app installed from diawi.com again i run it from xcode then i send the notifications with old device token(xxx1111) it getting notifications.

what is my mistake? help me pls.

Answer Source

TL;DR You've probably not uploaded the production APN certificate to your APN provider.

If the version of the app you run from Xcode works, but the exported version does not, then maybe you've only set up the development APN certificate in your APN provider. The exported app (be it Ad Hoc or Enterprise) is going to use a production certificate, so your APN certificate should be production too.

If you haven't created the production certificate, go to Certificates, Identifiers & Profiles in the developer portal, click on Production and choose Apple Push Notification service SSL (Sandbox & Production):

Production APN Certificate

p.s. The token should change between development and distribution versions of the app.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download