Some commonly used mobile phone information access methods:
[[Nsprocessinfo ProcessInfo] hostName]//globallyuniquestring Unique identifier, each call will be different, can be used as some temporary cache file name [[Nsprocessinfo ProcessInfo] globallyuniquestring]//Operating system name[[Nsprocessinfo ProcessInfo] operatingsystemname]//Operating system version [[Nsprocessinfo ProcessInfo] operatingsystemversionstring]//Physical Memory [[Nsprocessinfo ProcessInfo] physicalmemory]//Process Name [[Nsprocessinfo ProcessInfo] processName]//Supplier Identification [Uidevice Currentdevice].identifierforvendor//Device Type (IPhone, IPad) [Uidevice Currentdevice].userinterfaceidiom//Device Name [Uidevice currentdevice].name//System name [Uidevice currentdevice].systemname//System Version [Uidevice currentdevice].systemversion//Model [Uidevice Currentdevice].model//a localized model [Uidevice Currentdevice].localizedmodel//Battery Status [Uidevice currentdevice].batterylevel//Hostname:dounen//Globaluniquestring:b4b1ec8c-a805-434b-9d57-106ed70c214a-3528-00000af6a42d73d7//Operatingsystemname:nsmachoperatingsystem//operatingsystemversion:version 7.1.1 (Build 11d201)//physicalmem:1035976704//Processname:cityofheart//UniqueId: <__nsconcreteuuid 0x16693c80> 5acf8da1-fac1-4d70-ab1f-bb696188c5ca//userinterfaceidiom:0//Name: Childhood//Systemname:iphone OS//systemversion:7.1.1//Model:ipad//Localizemodel:ipad//batterylevel: -1.000000
In the issue of obtaining the version number, the development is often used in [[Uidevice currentdevice].systemversion Floatvalue];
But this is not accurate, for example, some system version is 8.2, so take the time is 8.1998, so that your phone system version number >=8.2, there will be problems,
And sometimes the phone system version number is 9.2.1, you take out is 9.2, so the comparison may also occur problems,
Therefore, the use of strings to determine the version number is accurate:
/** /= [@ "9.2.1" Compare: @ "9.2 [ options:nscaseinsensitivesearch]; if /* * nsordereddescending Greater than */ /* */ }
Get Mobile Info