- 獲取手機(jī)應(yīng)用的版本信息
NSDIctionary *infoDictionary = [[NSBundle mainBundel]infoDictionary];
NSString *name = [infoDictionary objectForKey:@"CFBundleName"];
NSString *version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSString *build = [infoDictionary objectForKey:@"CFBundleVersion"];
NSLog(@"%@,%@,%@,%@",infoDictionay,name,version,build);
- 獲取設(shè)備的基本信息
通過UIDevice類的對象聪全,可以獲取IOS設(shè)備如下的信息
UIDevice的屬性:
@property(nonatomic ,readonly,strong) NSString *name //設(shè)備的名稱泊藕,如xxx的iPhone6s
@property(nonatomic ,readonly ,strong)NSString *model;//設(shè)備的類型,例如 iPhone iPad touch
@property(nanatomic,readonly,strong)NSString *localizedModel; //localized version of model
@property(nonatomic,readonly,strong)NSString *systemVersion; //操作系統(tǒng)的版本號 如 8,3 9.2等
//獲取設(shè)備的基本信息
通過UIDevice類的對象荔烧,可以獲取ios設(shè)備如下的信息]
UIDevice *device = [UIDevice currentDevice];
NSLog(@"%@",device.name);
NSLog(@"%@",device.model);
NSLog(@"%@",device.localizedModel);
NSLog(@"%@",device.systemVersion);
//獲取設(shè)備的UUID
NSLog(@"%@",device.identifierForVendor.UUIDString);
轉(zhuǎn)自 http://www.reibang.com/p/9a673c22af31