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

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.