iOS 獲取手機的型號,系統版本,軟件名稱,軟件版本

清華大佬耗費三個月吐血整理的幾百G的資源,免費分享!....>>>

1: 獲取手機和軟件的一些基本信息

//手機序列號  
    NSString* identifierNumber = [[UIDevice currentDevice] uniqueIdentifier]; 
    NSLog(@"手機序列號: %@",identifierNumber); 
    //手機別名: 用戶定義的名稱  
    NSString* userPhoneName = [[UIDevice currentDevice] name]; 
    NSLog(@"手機別名: %@", userPhoneName); 
    //設備名稱  
    NSString* deviceName = [[UIDevice currentDevice] systemName]; 
    NSLog(@"設備名稱: %@",deviceName ); 
    //手機系統版本  
    NSString* phoneVersion = [[UIDevice currentDevice] systemVersion]; 
    NSLog(@"手機系統版本: %@", phoneVersion); 
    //手機型號  
    NSString* phoneModel = [[UIDevice currentDevice] model]; 
    NSLog(@"手機型號: %@",phoneModel ); 
    //地方型號  (國際化區域名稱)  
    NSString* localPhoneModel = [[UIDevice currentDevice] localizedModel]; 
    NSLog(@"國際化區域名稱: %@",localPhoneModel ); 
     
    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; 
    // 當前應用名稱  
    NSString *appCurName = [infoDictionary objectForKey:@"CFBundleDisplayName"]; 
    NSLog(@"當前應用名稱:%@",appCurName); 
    // 當前應用軟件版本  比如:1.0.1  
    NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; 
    NSLog(@"當前應用軟件版本:%@",appCurVersion); 
    // 當前應用版本號碼   int類型  
    NSString *appCurVersionNum = [infoDictionary objectForKey:@"CFBundleVersion"]; 

    NSLog(@"當前應用版本號碼:%@",appCurVersionNum); 



2:CFBundleVersion和CFBundleShortVersionString

CFBundleVersion,標識(發布或未發布)的內部版本號。這是一個單調增加的字符串,包括一個或多個時期分隔的整數。

CFBundleShortVersionString  標識應用程序的 發布版本號。該版本的版本號是三個時期分隔的整數組成的字符串。第一個整數代表重大修改的版本,如實現新的功能或重大變化的修訂。第二個整數表示的修訂,實現較突出的特點。第三個整數代表維護版本。該鍵的值不同于“CFBundleVersion”標識。

CFBundleVersion與CFBundleShortVersionString
圖片里的 
Version 對應的就是CFBundleShortVersionString (發布版本號 如當前上架版本為1.1.0  之后你更新的時候可以改為1.1.1)
       Build 對應的是 CFBundleVersion  (內部標示,用以記錄開發版本的,每次更新的時候都需要比上一次高 如:當前版本是11  下一次就要大于11 比如 12,13 ....10000)