2012-10-19 86 views
-2

我喜歡在Xcode中檢測任何iOS版本,任何iDevice(iPhone 4; iPhone 3G ...)以及maby設備的UDID,然後將其導入到一個UILable中。這可能嗎?檢測任何iOS版本

+3

懶惰。非常懶。 –

+1

[你有什麼嘗試?](http://www.whathaveyoutried.com) –

回答

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); 
+0

是否有可能看到像iPhone 4而不是iPhone的確切型號? – user1658674

+0

答案已更新。使用.platformType進行檢測 – CReaTuS