獲取iOS裝置資訊

2021-06-27 10:17:00 字數 1411 閱讀 6525

鑌哥就直接寫**了

/*獲取手機資訊

應用程式的名稱和版本號等資訊都儲存在mainbundle的乙個字典中,用下面**可以取出來

*/nsdictionary

* infodict =[[

nsbundle

mainbundle] infodictionary];

nsstring* versionnum =[infodict objectforkey:@"cfbundleversion"];

nsstring*text =[nsstring

nsstring * strmodel  = [uidevice

currentdevice].model ;

nslog(@"%@",strmodel);

//手機別名:使用者定義的名稱

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

// 當前應用名稱

nslog(@"

當前應用名稱:

// 當前應用軟體版本

比如:1.0.1

nslog(@"

當前應用軟體版本

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

nslog(@"

當前應用版本號碼:

iOS 獲取裝置資訊

ios 獲取裝置資訊 獲取裝置資訊,不囉嗦,直接上 uidevice idfa add adsupport.framework define kdeviceidfa asidentifiermanager sharedmanager advertisingidentifier uuidstring ...

ios獲取裝置資訊

我們寫專案的時候有時候可能會需要獲取到使用者的裝置資訊 下面用 簡要描述一下 uidevice currentdevice uidevice currentdevice nsstring strname currentdevice.name 裝置名稱 nsstring strmodel curren...

獲取iOS裝置資訊

獲取ios裝置資訊 2014 12 04 0 收藏 有時候做專案是需要獲取手機的相關資訊,好讓使用者知道自己的使用情況 鑌哥就直接寫 了 獲取手機資訊 應用程式的名稱和版本號等資訊都儲存在mainbundle的乙個字典中,用下面 可以取出來 nsdictionary infodict nsbundl...