獲取裝置資訊以及APP版本

2021-07-05 19:24:38 字數 989 閱讀 7153

uidevice

*device_=[[

uidevice

alloc

] init

];nslog(@"

裝置所有者的名稱--

%@",device_.name);

nslog(@"

裝置的類別-----

%@",device_.model);

nslog(@"

裝置的的本地化版本-

%@",device_.localizedmodel);

nslog(@"

裝置執行的系統---

%@",device_.systemname);

nslog(@"

當前系統的版本---

%@",device_.systemversion);

nslog(@"

裝置識別碼-----

%@",device_.identifierforvendor.uuidstring);

//得到裝置螢幕高度

float screenheight=[uiscreen

mainscreen].bounds.size.height;

//獲取類名

nsstring * classname = nsstringfromclass([

self

class]);

nsstring *systemversion = [uidevice currentdevice] systemversion];//系統版本

nsstring *systemmodel = [uidevice currentdevice] model];//是iphone 還是 ipad

nsdictionary *dic = [nsbundle mainbundle] infodictionary];//獲取info-plist

iOS獲取裝置型號和App版本號等資訊

nsdictionary infodictionary nsbundle mainbundle infodictionary 手機序列號 nsstring identifiernumber uidevice currentdevice uniqueidentifier 手機別名 使用者定義的名稱 n...

iOS獲得裝置相關資訊,獲取app相關資訊

裝置所有者名稱 device.name 裝置所有者名稱 nslog 裝置類別 device.model 裝置leibie nslog 本地化版本 device.localizedmodel 本地化版本 nslog 當前系統版本 device.systemversion 當期版本 nslog 當前系統...

005 獲取App資訊

1 1.取得當前專案的info.plist字典 2 nsdictionary infodictionary nsbundle mainbundle infodictionary 34 2.獲得當前軟體的版本號 bundle versions string,short 諸如 1.0 5 info.pl...