我知道[[UIDevice currentDevice] uniqueIdentifier]
不能用,我用了
- (NSString *) uniqueDeviceIdentifier{
NSString *macaddress = [[UIDevice currentDevice] macaddress];
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
NSString *stringToHash = [NSString stringWithFormat:@"%@%@",macaddress,bundleIdentifier];
NSString *uniqueIdentifier = [stringToHash stringFromMD5];
return uniqueIdentifier;
}
如果apple不會通過我的方法,應該怎麼獲得唯一的標示符?
用openUDID代替吧,https://github.com/ylechelle/OpenUDID