iOS 獲取應用資訊和裝置資訊

2021-08-14 08:07:14 字數 1014 閱讀 8703

nsdictionary *infodictionary =

[[nsbundle mainbundle] infodictionary]

;// 當前應用名稱

[infodictionary objectforkey:

@"cfbundledisplayname"];

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

[infodictionary objectforkey:

@"cfbundleshortversionstring"];

// 當前build版本

[infodictionary objectforkey:

@"cfbundleversion"

];

//手機序列號  

nsstring* identifiernumber =

[[uidevice currentdevice] uniqueidentifier]

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

nsstring* userphonename =

[[uidevice currentdevice] name]

;//裝置名稱

nsstring* devicename =

[[uidevice currentdevice] systemname]

;//手機系統版本

nsstring* phoneversion =

[[uidevice currentdevice] systemversion]

;//手機型號

nsstring* phonemodel =

[[uidevice currentdevice] model]

;//地方型號 (國際化區域名稱)

nsstring* localphonemodel =

[[uidevice currentdevice] localizedmodel]

;

獲取iOS裝置資訊

鑌哥就直接寫 了 獲取手機資訊 應用程式的名稱和版本號等資訊都儲存在mainbundle的乙個字典中,用下面 可以取出來 nsdictionary infodict nsbundle mainbundle infodictionary nsstring versionnum infodict obj...

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...