Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone APNS Device Tokens in sandbox vs. production

How do device tokens vary from sandbox to production modes?

I think I have locked up some device tokens into a production mode, and they can't be pushed to from development.

Any ideas on how I can check?

like image 581
Art C Avatar asked Dec 22 '09 01:12

Art C


People also ask

What is device token in Apple Push Notification?

Register your app with APNs and receive a globally unique device token, which is effectively the address of your app on the current device. Your provider server must have this token before it can deliver notifications to the device.

Does iOS device token change?

No, Device token will always be same .

Is device token unique in iOS?

The Device Tokens are NOT unique to the phone-app pairing. They are unique to the phone only. If you have multiple apps with push on the same phone they will all use the same Device Token. The certificate you use to send the notification will dictate which app it goes to.

What is device token in iOS?

A device token is an identifier for the Apple Push Notification System for iOS devices. Apple assigns a Device Token on a per-app basis (iOS 7 and later) which is used as a unique identifier for sending push notifications.


1 Answers

When you build your app using a development cert, the app will generate a unique device token. This device token will not work on the production push network. When you then build your app with a distribution provisioning profile (App Store or Ad-Hoc) your device will generate a different device token for push notifications. If you try to send the development generated token to the production push SSL network, Apple's servers will reject your token.

like image 84
marcc Avatar answered Sep 22 '22 02:09

marcc