简单获取UUID 设备唯一标示 应用删除后设备标示不变

 + (NSString *)UUID {

        KeychainItemWrapper *wrapper = [[KeychainItemWrapper alloc] initWithIdentifier:@"HuangyibiaoAppID" accessGroup:@"com.huangyibiao.test.group"];

        NSString *UUID = [wrapper objectForKey:(__bridge id)kSecValueData];

        

        if (UUID.length == 0) {

            UUID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

            [wrapper setObject:UUID forKey:(__bridge id)kSecValueData];

        }

        

        return UUID;

    }



你可能感兴趣的:(UUID,keychain,设备唯一标示,ios)