iOS獲取系統(tǒng)信息
獲取版本號
NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];
NSLog(@"手機系統(tǒng)版本: %@", phoneVersion);
獲取手機序列號
NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier];
NSLog(@"手機序列號: %@",identifierNumber);
獲取手機型號
NSString* phoneModel = [[UIDevice currentDevice] model];
NSLog(@"手機型號: %@",phoneModel );
獲取手機設(shè)備名稱
NSString* deviceName = [[UIDevice currentDevice] systemName];
NSLog(@"設(shè)備名稱: %@",deviceName );
獲取手機別名
NSString* userPhoneName = [[UIDevice currentDevice] name];
NSLog(@"手機別名: %@", userPhoneName);
獲取應(yīng)用信息
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
當(dāng)前應(yīng)用名稱
NSString *appCurName = [infoDictionary objectForKey:@"CFBundleDisplayName"];
NSLog(@"當(dāng)前應(yīng)用名稱:%@",appCurName);
當(dāng)前應(yīng)用軟件版本 比如:1.0.1
NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSLog(@"當(dāng)前應(yīng)用軟件版本:%@",appCurVersion);
當(dāng)前應(yīng)用版本號碼 int類型
NSString *appCurVersionNum = [infoDictionary objectForKey:@"CFBundleVersion"];
NSLog(@"當(dāng)前應(yīng)用版本號碼:%@",appCurVersionNum);
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者