首页 > 代码库 > IOS开发-Object-C获取手机设备信息(UIDevice)

IOS开发-Object-C获取手机设备信息(UIDevice)

获取UiDevice设备信息

// 获取设备名称NSString *name = [[UIDevice currentDevice] name];// 获取设备系统名称NSString *systemName = [[UIDevice currentDevice] systemName];// 获取系统版本NSString *systemVersion = [[UIDevice currentDevice] systemVersion];// 获取设备模型NSString *model = [[UIDevice currentDevice] model];// 获取设备本地模型NSString *localizedModel = [[UIDevice currentDevice] localizedModel];

 

获取Bundle的相关信息

NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];// app名称NSString *appName = infoDict[@"CFBundleName"];// app版本NSString *appVersion = infoDict[@"CFBundleShortVersionString"];// app build版本NSString *appBuild = infoDict[@"CFBundleVersion"];

 

IOS开发-Object-C获取手机设备信息(UIDevice)