Get iOS system version

Source: Internet
Author: User

How to obtain system information for iOS devices [Uidevice Currentdevice]

Get system Information for iphone using [Uidevice Currentdevice] with the following information:

[[Uidevice Currentdevice] systemName]: System name, such as iphone OS

[[Uidevice Currentdevice] systemversion]: System version, such as 4.2.1

[[Uidevice Currentdevice] model]:the model of the device, such as iphone or ipod Touch

[[Uidevice Currentdevice] uniqueidentifier]: Unique identification number of the device, DeviceID

[[Uidevice Currentdevice] name]: device names, such as Zhang San's iphone

[[Uidevice Currentdevice] localizedmodel]:the model of the device as a localized string, similar model

Nsdictionary *infodictionary =[[NSBundle Mainbundle] infodictionary];  Cfshow (infodictionary); //App NameNSString *app_name = [Infodictionary objectforkey:@"Cfbundledisplayname"]; //App versionNSString *app_version = [Infodictionary objectforkey:@"cfbundleshortversionstring"]; //App build versionNSString *app_build = [Infodictionary objectforkey:@"cfbundleversion"]; //Phone serial numbernsstring* Identifiernumber =[[Uidevice currentdevice] uniqueidentifier]; NSLog (@"Phone serial number:%@", Identifiernumber); //Phone Aliases: User-defined namesnsstring* Userphonename =[[Uidevice Currentdevice] name]; NSLog (@"phone alias:%@", Userphonename); //Device Namensstring* devicename =[[Uidevice Currentdevice] systemName]; NSLog (@"device Name:%@", devicename); //Mobile phone system versionnsstring* phoneversion =[[Uidevice Currentdevice] systemversion]; NSLog (@"Mobile Phone system version:%@", phoneversion); //Phone Modelnsstring* Phonemodel =[[Uidevice Currentdevice] model]; NSLog (@"phone Model:%@", Phonemodel); //Local Model (internationalized region name)nsstring* Localphonemodel =[[Uidevice Currentdevice] Localizedmodel]; NSLog (@"Internationalization region name:%@", Localphonemodel); Nsdictionary*infodictionary =[[NSBundle Mainbundle] infodictionary]; //Current app nameNSString *appcurname = [Infodictionary objectforkey:@"Cfbundledisplayname"]; NSLog (@"Current application name:%@", Appcurname); //Current application version such as: 1.0.1NSString *appcurversion = [Infodictionary objectforkey:@"cfbundleshortversionstring"]; NSLog (@"Current application software version:%@", appcurversion); //Current app version number int typeNSString *appcurversionnum = [Infodictionary objectforkey:@"cfbundleversion"]; NSLog (@"Current App version number:%@", Appcurversionnum);

Get iOS system version

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.