Question

I have an (PhoneGap) App that will successfully get Passbook Passes and will also successfully receive Push Notifications separate from Passbook (when faking the device ID).

The problem I am having is that the device ID passbook sends to register the device does not match the APNS device ID. And even worse, I cannot for the life of me make the device get a different ID (even after multiple APNS certs and the uninstalling, setting date ahead technique)

  • Launch app
  • APNS yes/no? Yes!
  • Call for APNS device ID is received (same one as always)
  • Go ahead and create passbook pass, add pass
  • Passbook makes callback (register device) with device ID received from Apple different than APNS device ID

Both are using the same CSR file to create APNS and pass type id, an active provisioning profile (with push and passbook enabled). I'm not sure what the problem is, but half the problem is that APNS will not give it a new ID.

What am I doing wrong here? I'm assuming I'm not crazy and the device IDs should match.

Thanks

Was it helpful?

Solution

As others have commented, this is expected.

Refer to Passbook Programming Guide: Updating a Pass specifically -

The device library identifier is a Passbook-specific shared secret between the user’s device and your web server. It is not related to the device identifier (UDID). The device identifies itself with a different ID to different servers and it may change its ID at any time. Its purpose is to allow efficient communication between the device and your server, not to let your server keep a list of of what passes are currently installed on a device. The device library identifier uniquely identifies a device and indicates that the entity making the request is authorized to make such a request.

and also from Local and Push Notitifcation Programming Guide

Note: A device token is not the same thing as the device UDID returned by the identifierForVendor or uniqueIdentifier property of UIDevice or any other similar properties such as the advertisingIdentifier property of ASIdentifierManager.

Apple goes to some lengths to prevent the facilitation of unintentional tracking, so different frameworks will return different device identifiers on the same device for a given App. Different Apps on the same device will also obtain different identifiers from the same frameworks.

EDIT - The Pushtoken (also supplied at registration) is used to identify the device in subsequent push notifications, not the DeviceLibraryID, but the concept is the same - this identifier is unique to other identifiers on the same device.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top