UDID in iOS7

uniqueIdentifier is not support in iOS7 SDK now, but we still have some features interested:

1 How will the app build in iOS6 SDK get?

Yes the old app still work without any exception, but will return a strange value normally as FFFFFFFFxxxx instead of a fixed string.

I test with several app in AppStore and my test app. All return value is different. It also has not relationship with bundle id, bcoz same profile with different bundle id will still return the same id. So I guess it's sth like identifierForVendor, base on the profile.

Will it change when the profile update or device reset? Who knows!

2 How can we use it in XCode 5?

XCode 5 update seems will kill your SDK 6.x, but u can still copy it back and see it in the SDK list, but that won't help u, bcoz XCode still can't reconize this API.

Another way, you can handle it as a private as bellow:

@interface UIDevice(UDID)

@property(nonatomic,readonly,retain) NSString    *uniqueIdentifier;

@end

 

It do just like build on SDK6.x

猜你喜欢

转载自shappy1978.iteye.com/blog/1960025