IOS obtains the mobile phone model, system version, software name, and software version.

Source: Internet
Author: User

If it is found online, it will be easy to use after record:

// Mobile phone serial number nsstring * identifiernumber = [[uidevice currentdevice] uniqueidentifier]; nslog (@ "mobile phone serial number: % @", identifiernumber); // mobile phone alias: user-Defined name nsstring * userphonename = [[uidevice currentdevice] Name]; nslog (@ "Mobile Phone alias: % @", userphonename ); // device name nsstring * devicename = [[uidevice currentdevice] systemname]; nslog (@ "device name: % @", devicename ); // mobile phone system version nsstring * phoneversion = [[uidevice currentdevice] systemversion]; nslog (@ "Mobile Phone System Version: % @", phoneversion ); // mobile phone model nsstring * phonemodel = [[uidevice currentdevice] model]; nslog (@ "Mobile Phone model: % @", phonemodel); // local model (International region name) nsstring * localphonemodel = [[uidevice currentdevice] localizedmodel]; nslog (@ "International region name: % @", localphonemodel); nsdictionary * infodictionary = [[nsbundle mainbundle] infodictionary]; // The current application name nsstring * appcurname = [infodictionary objectforkey: @ "cfbundledisplayname"]; nslog (@ "Current Application name: % @", appcurname ); // The current application version, for example, 1.0.1 nsstring * appcurversion = [infodictionary objectforkey: @ "cfbundle#versionstring"]; nslog (@ "current application version: % @", appcurversion ); // current application version number: int type nsstring * appcurversionnum = [infodictionary objectforkey: @ "cfbundleversion"]; nslog (@ "current application version number: % @", appcurversionnum );

Result:

14:07:47. 622 mydemo [5779: 707] mobile phone serial number: 6685c75e34213be0b04c6ceb72985dc381f0f7462012-10-19 14:07:47. 624 mydemo [5779: 707] Phone alias: "spring sky" iPod2012-10-19 14:07:47. 627 mydemo [5779: 707] device name: iPhone OS2012-10-19 14:07:47. 629 mydemo [5779: 707] Mobile Phone System Version: 5.1.12012-10-19 14:07:47. 641 mydemo [5779: 707] Phone model: IPOD touch2012-10-19 14:07:47. 642 mydemo [5779: 707] international region name: IPOD touch2012-10-19 14:07:47. 643 mydemo [5779: 707] current application name: myDemo2012-10-19 14:07:47. 645 mydemo [5779: 707] current application version: 1.0.12012-10-19 14:07:47. 646 mydemo [5779: 707] current application version number: 101

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.