Shimen the Lord to contribute. Respect the work of the author. Please do not reprint.
Suppose the article is helpful to you. You are welcome to donate to the author. Support Shimen Master. The donation amount is arbitrary, heavy in the mind ^_^
I want to donate: Click Donate
Cocos2d-x source code Download: Dot I teleport
Games Official Download:HTTP://DWZ.CN/RWTJL
Game video preview:http://dwz.cn/RzHHd
Game Development Blog:Http://dwz.cn/RzJzI
Game Source code transfer : Http://dwz.cn/Nret1
1. Regular usage
NSLog (@ "HostName:%@", [[Nsprocessinfo ProcessInfo] HostName]);//globallyuniquestring Unique identifier, each call will be different, Can be used as some temporary cache file name NSLog (@ "globaluniquestring:%@", [[Nsprocessinfo ProcessInfo] globallyuniquestring]);//operating system name NSLog ( @ "Operatingsystemname:%@", [[Nsprocessinfo ProcessInfo] operatingsystemname]);//operating system version number NSLog (@ " operatingSystemVersion:%@ ", [[[Nsprocessinfo ProcessInfo] operatingsystemversionstring]);//Physical Memory NSLog (@" Physicalmem :%llu ", [[[Nsprocessinfo ProcessInfo] physicalmemory]);//Process name NSLog (@" ProcessName:%@ ", [[Nsprocessinfo ProcessInfo] ProcessName]);//supplier Identification NSLog (@ "UniqueId:%@", [Uidevice Currentdevice].identifierforvendor);//device type (IPhone, IPAD) NSLog (@ "Userinterfaceidiom:%d", [Uidevice Currentdevice].userinterfaceidiom);//Device name NSLog (@ "Name:%@", [ Uidevice currentdevice].name);//System name NSLog (@ "SystemName:%@", [Uidevice currentdevice].systemname);//System version number NSLog (@ " Systemversion:%@ ", [Uidevice currentdevice].systemversion);//Model NSLog (@" model:%@ ", [Uidevice Currentdevice].model) ;//localized Model NSLog (@"Localizemodel:%@", [Uidevice Currentdevice].localizedmodel);//battery Status NSLog (@ "Batterylevel:%f", [Uidevice Currentdevice].batterylevel);
2. Infer if the device is more than 9.0 systems
[[[Uidevice Currentdevice] systemversion] floatvalue] >= 9.0f
Note:
If our device version number is 9.1.1 (string type), the value of the Floatvalue float is 9.100000.
3. Infer if the device is an iphone, IPad
Ipad:[[uidevice Currentdevice] userinterfaceidiom] = = Uiuserinterfaceidiompadiphone: [[UIDevice CurrentDevice] USERINTERFACEIDIOM] = = Uiuserinterfaceidiomphoneuiuserinterfaceidiom in Uidevice.htypedef NS_ENUM (NSInteger, UIUSERINTERFACEIDIOM) {#if __iphone_3_2 <= __iphone_os_version_max_allowed uiuserinterfaceidiomphone, / /IPhone and IPod touch style UI uiuserinterfaceidiompad, //IPad style ui#endif};
Shimen the main contribution, respect the work of the author, please do not reprint.
If the article is helpful to you, you are welcome to donate to the author, support Shimen, and donate any amount. Heavy on the mind ^_^
I want to donate: Click Donate
Cocos2d-x source code Download: Dot I teleport
Games Official Download:HTTP://DWZ.CN/RWTJL
Game video preview:http://dwz.cn/RzHHd
Game Development Blog:Http://dwz.cn/RzJzI
Game Source code transfer : Http://dwz.cn/Nret1
[Ios]ios get device information frequently used