Get Mobile Info

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.