IOS-獲取Model(設備型號)、Version(設備版本號)、app(程序版本號)等 – iPhone手機開發技術文章 iPhone軟體開發教學課程

[cpp] 
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"]; 

 

發佈留言