iOS 怎樣獲得裝置及應用相關資訊

2021-08-06 07:16:29 字數 1419 閱讀 8847

uidevice *device = [[uidevice alloc] init];

nslog(@"裝置所有者名稱  %@  ",device.name);//裝置所有者名稱

nslog(@"裝置類別  %@",device.model);//裝置類別

nslog(@"本地化版本  %@",device.localizedmodel);//本地化版本

nslog(@"當前系統版本  %@",device.systemversion);//當期版本

nslog(@"當前系統  %@",device.systemname);//當前系統

nslog(@"系統唯一標示符  %@",[[[uidevice currentdevice ] identifierforvendor] uuidstring]);//唯一標示

nslog(@"電量   %f",[[uidevice currentdevice] batterylevel]);//輸出-1為模擬器  輸出0-1為真機

nsarray *languagearray = [nslocale preferredlanguages];

for (nsstring *language in languagearray)

nslocale *locale = [nslocale currentlocale];

nsstring *country = [locale localeidentifier];

nslog(@"國家:%@", country); //國別

//解析度

cgfloat scale_screen = [uiscreen mainscreen].scale;

nslog(@"screen w:%f",width*scale_screen);

nslog(@"screen h:%f",height*scale_screen);

//獲得運營商資訊

cttelephonynetworkinfo *info = [[cttelephonynetworkinfo alloc] init];

nslog(@"info  %@", info);

//  獲取執行商的名稱

ctcarrier *carrier = [info subscribercellularprovider];

nsstring *mcarrier = [nsstring stringwithformat:@"%@",[carrier carriername]];

nslog(@"%@", mcarrier);

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

nslog(@"應用所有資訊 %@",dicinfo);

nslog(@"wanluo:%@",info.currentradioaccesstechnology);

ios機器上,應用列表的獲得

越獄機器可以在以下目錄獲得plist資訊 var mobile library mobileinstallation lastlaunchservicesmap.plist 在模擬器上的目錄中,我們可以找到相同的plist檔案,例如 其中的ed1c41c2 da15 4d89 9612 4a532c...

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

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

iOS應用開發中的裝置標識

但總體來說itunes connect提供的功能還比較有限,而且基本不能定製 除非你能說服蘋果 對於應用發布後的跟蹤和資料收集,很多時候是itunes connect之外的事情,甚至有些開發者對於閃退日誌收集等也拋棄了itunes connect的crash report。那麼乙個識別具體裝置的標誌...