How to determine the IOS version

Source: Internet
Author: User

-(Void) getiosversion

{

// # If _ iphone_ OS _version_max_allowed> = 50000 // This method is related to the compiler.

// Quanju. iosversion = 1;

// # Endif

Float version = [[[uidevice currentdevice] systemversion] floatvalue];

If (version> = 5.0)

{

Quanju. iosversion = 1; // defines the global variable to mark the IOS version

}

}

-(Void) getiosmodel

{

Cgsize sizetorequest;
If ([[[uidevicecurrentdevice] model] rangeofstring: @ "iPad"]. Location = 0)
Sizetorequest = cgsizemake (748,110 );
Else
Sizetorequest = cgsizemake (320, 48 );

}

// The following method is used to determine other information in IOS.

Obtain process information and device information (including Device Type, serial number, and IOS version)
[[Nsprocessinfo processinfo] globallyuniquestring],
[[Nsprocessinfo processinfo] hostname],
[[Nsprocessinfo processinfo] operatingsystemname],
[[Nsprocessinfo processinfo] operatingsystemversionstring],
[[Nsprocessinfo processinfo] physicalmemory],
[[Nsprocessinfo processinfo] processname]);
------------------------------
[Uidevice currentdevice]. uniqueidentifier,
[Uidevice currentdevice]. Name,
[Uidevice currentdevice]. systemname,
[Uidevice currentdevice]. systemversion,
[Uidevice currentdevice]. model,
[Uidevice currentdevice]. localizedmodel,
[Uidevice currentdevice]. batterylevel
___________________________________________________
Nslog ([[uidevice currentdevice] Name]); // name of the phone as named by user
Nslog ([[uidevice currentdevice] uniqueidentifier]); // a guid like string
Nslog ([[uidevice currentdevice] systemname]); // "iPhone OS"
Nslog ([[uidevice currentdevice] systemversion]); // "2.2.1"
Nslog ([[uidevice currentdevice] model]); // "iPhone" on both devices
Nslog ([[uidevice currentdevice] localizedmodel]); // "iPhone" on both devices

From: http://blog.csdn.net/jinglijun/article/details/7292674

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.