내가 [[UIDevice currentDevice] uniqueIdentifier]
가 거부되는 알고, 내가 사용 : 내 방법은 애플에 의해 승인되지 않으면UDID 대체품?
- (NSString *) uniqueDeviceIdentifier{
NSString *macaddress = [[UIDevice currentDevice] macaddress];
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
NSString *stringToHash = [NSString stringWithFormat:@"%@%@",macaddress,bundleIdentifier];
NSString *uniqueIdentifier = [stringToHash stringFromMD5];
return uniqueIdentifier;
}
, 무슨 방법 나는 고유 한 식별자를받을 수 있나요?
+ (NSString *)GetUUID {
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
CFRelease(theUUID);
return [(NSString *)string autorelease];
}
그리고 :
위의 코드에서 내 방법이 올바른 경우? – pengwang
당신의 방법은 효과가 있습니다; 그러나 다른 방법과 마찬가지로, 번들 ID를 MAC 주소에 추가하기 때문에 앱에 고유합니다. 맥 주소는 번들 ID가 고유하기 때문에 장치와 장치가 고유합니다. 기기에 고유하게 사용하려면 (모든 앱에서 동일하게) 번들 ID를 추가하는 부분을 삭제할 수 있습니다. –
답장을 보내 주셔서 감사합니다. – pengwang