2012-06-06 31 views
0

出於某種原因,我需要知道運行我的應用的設備的型號版本。我不需要知道設備上運行的iOS版本,但設備的版本,例如:「iPhone 3G」,「iPhone 4S」,「iPad 2」... ...iPhone/iPad/iPod型號版本

它似乎沒有了的UIDevice類給出了這樣的信息: 識別設備和操作系統 name屬性 SystemName屬性 systemVersion財產 模型屬性 localizedModel財產 userInterfaceIdiom財產 唯一標識符財產的iOS 5.0已過時

難道我想念什麼?

感謝

+0

您錯過了尋找這個問題.. http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model –

回答

2

退房UIDevice-Extension

添加功能的UIDevice像iPod touch的1G和2G的平臺和iPhone之間的區別

UIDevice-Hardware.h類公司有可能得到:

- (NSString *) platform; 
- (NSString *) hwmodel; 
- (NSUInteger) platformType; 
- (NSString *) platformString;