如何通过在iphone中编程实现fnd UUID?
我想通过编程获取iphone的UUID,并将其存储在我的数据库中 我可以使用UUID检查应用程序是否已购买 如何获取它?请尝试以下代码:如何通过在iphone中编程实现fnd UUID?,iphone,objective-c,cocoa-touch,ios4,uuid,Iphone,Objective C,Cocoa Touch,Ios4,Uuid,我想通过编程获取iphone的UUID,并将其存储在我的数据库中 我可以使用UUID检查应用程序是否已购买 如何获取它?请尝试以下代码: UIDevice *device = [UIDevice currentDevice]; NSString *uniqueIdentifier = [device uniqueIdentifier]; 下面使用 NSString *uuid = [[UIDevice currentDevice] uniqueIdentifier]; 在文档中搜索“U
UIDevice *device = [UIDevice currentDevice];
NSString *uniqueIdentifier = [device uniqueIdentifier];
下面使用
NSString *uuid = [[UIDevice currentDevice] uniqueIdentifier];
在文档中搜索“UDID”需要五秒钟的时间
不,您无法从UDID收集信息
有关UDID的更多信息,请查看
UIDevice
文档。一般来说,很少单独使用UDID,因为设备可以传递给拥有不同iTunes帐户的不同用户。UDID或UUID?如果是第一个,则它位于iPhone中,可以通过UIDevice类访问。第二个是唯一标识符。
NSString * UDID = [[UIDevice currentDevice] uniqueIdentifier];
UDID = [UDID stringByReplacingOccurrencesOfString:@"-" withString:@""];
NSString * UDID = [[UIDevice currentDevice] uniqueIdentifier];
UDID = [UDID stringByReplacingOccurrencesOfString:@"-" withString:@""];