标签:
第三方开源代码
https://github.com/soffes/SAMKeychain
使用方法
//获取设备信息32 位字符串
-(NSString *)getDeviceString{
NSString * deviceUUIDStr = [SAMKeychain passwordForService:@"你的app bundle identifier" account:@"uuid"];
if (deviceUUIDStr == nil || [deviceUUIDStr isEqualToString:@""])
{
deviceUUIDStr = [[[UIDevice currentDevice].identifierForVendor.UUIDString stringByReplacingOccurrencesOfString:@"-" withString:@""] lowercaseString];
[SAMKeychain setPassword: deviceUUIDStr forService:@"你的app bundle identifier"account:@"uuid"];
}
return deviceUUIDStr;
}
标签:
原文地址:http://www.cnblogs.com/rookie-dream/p/5829280.html