EricD
EricD

Reputation: 551

How to identify development push token in a production list for APNS?

I have a list of production push token for Apple push notification, with few developement token inside. Is it possible to identify them without send a notification to Apple ?

Upvotes: 2

Views: 1235

Answers (1)

Nick
Nick

Reputation: 2613

The short answer is no.

Each pushtoken is generated at runtime on a device by either a development build or an adhoc/distribution build. Each build generates a different pushtoken but there's no way to reliably know, without knowing the build, which is which.

If you have a list of pushtokens and most are production, and if you have the ability to send push notifications to those push tokens, you could try sending push notifications to each device using Apple's Push Notification services (APNs). Ideally, use the enhanced binary interface to get immediate feedback from Apple. If you pushing to a development push token via the production gateway, Apple will return an explicit error (either error 1 or 8, not sure). Alternatively, you could use the Feedback Service which provides less detail. The only problem with the Feedback service is that you might get reports of valid production tokens that are simply inactive at the moment of sending.

Upvotes: 2

Related Questions