Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何通过在iphone中编程实现fnd UUID?_Iphone_Objective C_Cocoa Touch_Ios4_Uuid - Fatal编程技术网

如何通过在iphone中编程实现fnd 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

我想通过编程获取iphone的UUID,并将其存储在我的数据库中

我可以使用UUID检查应用程序是否已购买

如何获取它?

请尝试以下代码:

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:@""];