獲取iPhone設(shè)備碼代碼如下:
NSString *idfv = [[[UIDevice currentDevice] identifierForVendor] UUIDString];//獲取設(shè)備碼
NSString *UUIDStr = [idfv stringByReplacingOccurrencesOfString:@"-" withString:@""];//去除"-"分隔符,得到有效的設(shè)備碼
UUIDStr = [UUIDStr lowercaseString];//將大寫字母轉(zhuǎn)換成小寫
NSLog(@"設(shè)備id -- %@",UUIDStr);