1. 程式人生 > >iOS-獲取Model(設備型號)、Version(設備版本)、app(程序版本)等

iOS-獲取Model(設備型號)、Version(設備版本)、app(程序版本)等

popu device style post short tar .html tex system

IOS-獲取Model(設備型號)、Version(設備版本)、app(程序版本)等

NSLog(@"uniqueIdentifier: %@", [[UIDevice currentDevice] uniqueIdentifier]);
NSLog(@"name: %@", [[UIDevice currentDevice] name]);
NSLog(@"systemName: %@", [[UIDevice currentDevice] systemName]);
NSLog(@"systemVersion: %@", [[UIDevice currentDevice] systemVersion]);
NSLog(@"model: %@", [[UIDevice currentDevice] model]);
NSLog(@"localizedModel: %@", [[UIDevice currentDevice] localizedModel]);

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

CFShow(infoDictionary);

// app名稱

NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];

// app版本號

NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];

// app build版本號

NSString *app_build = [infoDictionary objectForKey:@"CFBundleVersion"];

iOS-獲取Model(設備型號)、Version(設備版本)、app(程序版本)等