iOS 獲取裝置資訊

2021-07-07 10:22:50 字數 1304 閱讀 2757

ios 獲取裝置資訊

獲取裝置資訊,不囉嗦,直接上**:

/********************** uidevice *************************/

//idfa

//add: adsupport.framework

#define kdeviceidfa [[asidentifiermanager sharedmanager] advertisingidentifier].uuidstring

//idfv

#define kdeviceidfv [[uidevice currentdevice] identifierforvendor].uuidstring

//uuid

#define kdeviceuuid [nsuuid uuid].uuidstring

//openudid

#define kdeviceopenudid [openudid value]

//invited id

#define kinvitedid [[nsuserdefaults standarduserdefaults] stringforkey:@

"invitedid"]

//系統名稱,如

iphone os

#define kdevicesystemname [uidevice currentdevice].systemname //

系統版本,如

4.2.1

#define kdevicesystemversion [uidevice currentdevice].systemversion

//the model of the device

,如iphone

或者ipod touch

#define kdevicemodel [uidevice currentdevice].model

//localized version of model

#define kdevicelocalizedmodel [uidevice currentdevice].localizedmodel //

裝置的惟一標識號,

deviceid--identifierforvendor

#define kdeviceidentifierforvendor [uidevice currentdevice].identifierforvendor.uuidstring //

裝置的名稱,如

張三的iphone

#define kdevicename [uidevice currentdevice].name

獲取iOS裝置資訊

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

ios獲取裝置資訊

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

獲取iOS裝置資訊

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