iOS 獲得當前的版本號app等詳解

2021-07-11 08:57:33 字數 1083 閱讀 8060

nsdictionary *infodictionary = [[nsbundle mainbundle] infodictionary];  

cfshow(infodictionary);  

//手機序列號

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];  

// 當前應用名稱

// 當前應用軟體版本  比如:1.0.1

// 當前應用版本號碼   int型別

iOS 獲取app版本號

來嘍來嘍,瞧一瞧看一看,一點小技巧,只用一分鐘,看不到吃虧,看不到上當 hoho 那我們就來展示一下這個plist檔案的內容吧。只有一段 和兩張,仔細看哦 nslog dics nsbundle mainbundle infodictionary 獲取plist檔案內容 nslog nsbundle...

ios獲取版本號等

nslog uniqueidentifier uidevice currentdevice uniqueidentifier nslog name uidevice currentdevice name nslog systemname uidevice currentdevice systemna...

iOS獲取當前app的名稱和版本號

nsdictionary infodictionary nsbundle mainbundle infodictionary 手機序列號 nsstring identifiernumber uidevice currentdevice uniqueidentifier nslog 手機序列號 ide...