UPDATE:
I guess I read this one a bit too quickly. Please note my revisions. If the answer meets your use-case please feel free to accept it.
Based on your description I would suggest that there have been underlying changes to the token generation between iOS6 and iOS7. To examine this behavior more closely I recommend that you take a look at the Local and Push Notifications Programming Guide. Within the Guide in the section for "Scheduling, Registering, and Handling Notifications," one will find this statement from Apple.
Device tokens can change. Your app needs to reregister every time it
is launched—in iOS by calling the registerForRemoteNotificationTypes:
method of UIApplication, and in OS X by calling the
registerForRemoteNotificationTypes: method of NSApplication. The
parameter passed to this method specifies the initial types of
notifications that the application wishes to receive. Users can modify
the enabled notification types at any point, using Settings in iOS or
System Preferences in OS X. You can query the currently enabled
notification types using the enabledRemoteNotificationTypes property
of UIApplication or the enabledRemoteNotificationTypes property of
NSApplication. The system does not badge icons, display alert
messages, or play alert sounds if any of these notifications types are
not enabled for your app, even if they are specified in the
notification payload.
Reference:
Apple uses device tokens when users agree to receive remote notifications from the Apple Push Service.
Typically the device token is accessed in the following method:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
deviceToken
A token that identifies the device to APS. The token is an opaque data
type because that is the form that the provider needs to submit to the
APS servers when it sends a notification to a device. The APS servers
require a binary format for performance reasons.
Note that the device token is different from the uniqueIdentifier
property of UIDevice because, for security and privacy reasons, it
must change when the device is wiped.
There are also significant changes to the UIDevice Identifier (Apple has restricted usage). I would suggest the following reads:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…