Вопрос по ios, uniqueidentifier – Как я могу заменить uniqueIdentifier на CFUUIDCreate?

10

Error: User Rate Limit ExceededuniqueIdentifierError: User Rate Limit ExceededCFUUIDCreateError: User Rate Limit Exceeded

UIDevice *dev = [UIDevice currentDevice];
NSString *deviceUuid;
if ([dev respondsToSelector:@selector(uniqueIdentifier)])
    deviceUuid = dev.uniqueIdentifier;
else {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    id uuid = [defaults objectForKey:@"deviceUuid"];
    if (uuid)
        deviceUuid = (NSString *)uuid;
    else {
        CFStringRef cfUuid = CFUUIDCreateString(NULL, CFUUIDCreate(NULL));
        deviceUuid = (__bridge NSString *)cfUuid;
        CFRelease(cfUuid);
        [defaults setObject:deviceUuid forKey:@"deviceUuid"];
    }
}

Error: User Rate Limit ExceededuniqueIdentifierError: User Rate Limit ExceededCFUUIDCreate?

Error: User Rate Limit ExceededCFUUIDCreateError: User Rate Limit Exceeded filou
Error: User Rate Limit ExceededuniqueIdentifierError: User Rate Limit Exceeded filou
Error: User Rate Limit Exceeded Brad Larson♦
Error: User Rate Limit Exceededstackoverflow.com/questions/6993325/…Error: User Rate Limit Exceeded Majster

Ваш Ответ

1   ответ
26
 iOS < 6.0
// Create universally unique identifier (object)
CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault);

// Get the string representation of CFUUID object.
NSString *uuidStr = (__bridge_transfer NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject);
CFRelease(uuidObject);
iOS >= 6.0
NSString* UDID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
Error: User Rate Limit Exceeded filou
Error: User Rate Limit Exceeded
Error: User Rate Limit ExceededUIDevice here, The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit ExceededDocumentation

Похожие вопросы