检测任何iOS版本

时间:2012-10-19 13:09:58

标签: ios detect udid

我喜欢用Xcode中的代码检测任何iOS版本,任何iDevice(iPhone 4; iPhone 3G ...),然后使用设备的UDID,然后将其导入一个UILabel。这可能吗?

2 个答案:

答案 0 :(得分:2)

是。首先搜索堆栈溢出,这个问题有很多答案。其次阅读文档。 https://developer.apple.com/library/ios/navigation/

答案 1 :(得分:1)

尝试添加此代码行:

NSLog(@"Device name: %@", [UIDevice currentDevice].name);
NSLog(@"Device model: %@", [UIDevice currentDevice].model);
NSLog(@"Device iOS version: %@", [UIDevice currentDevice].systemVersion);

NSLog(@"Device Platform: %@", [UIDevice currentDevice].platformType);
NSLog(@"Device Platform String: %@", [UIDevice currentDevice].platformString);