ios-Get Model (device model), version (device version number), app (program version number), etc.

Source: Internet
Author: User

App name

nsstring *app_name1 = [[nsbundle mainbundle] Objectforinfodictionarykey:@ "Cfbundledisplayname"];

    nsstring *app_name = [ nsstring Stringwithformat: @ "%@" ,[[ nsbundle Mainbundle " objectforinfodictionarykey:( nsstring *) Kcfbundlenamekey ];

nsstring *app_name2 = [nsstring stringwithformat:@ "%@", [ [nsbundle mainbundle] objectforinfodictionarykey:(nsstring *) Kcfbundleexecutablekey]];

NSLog (@ "==============1%@-----%@---%@", app_name1,app_name,app_name2);

//app version

    

    nsstring *app_version1 = [ nsstring stringwithformat: @ "v%@" nsbundle mainbundle " objectforinfodictionarykey :( nsstring *) Kcfbundleversionkey ];

nsstring *app_version = [[nsbundle mainbundle] Objectforinfodictionarykey:@ "cfbundleshortversionstring"];

NSLog (@ "==============1%@---%@", app_version1,app_version);

//App build version

    nsstring *app_build1 = [ nsstring Stringwithformat: @ "v%@" nsbundle Mainbundle " objectforinfodictionarykey:( nsstring *) Kcfbundleversionkey ];

nsstring *app_build = [[nsbundle mainbundle] Objectforinfodictionarykey:@ "cfbundleversion"];

NSLog (@ "==============1%@---%@", App_build1,app_build);


//ios getting system Information

//nslog (@ "identifier:%@", [[Uidevice Currentdevice] identifierforvendor]);

//nslog (@ "Name:%@", [[Uidevice Currentdevice] name]);

//nslog (@ "SystemName:%@", [[Uidevice Currentdevice] systemName]);

//nslog (@ "systemversion:%@", [[Uidevice Currentdevice] systemversion]);

//nslog (@ "model:%@", [[Uidevice Currentdevice] model]);

//nslog (@ "Localizedmodel:%@", [[Uidevice Currentdevice] localizedmodel]);

iOS get IP reference: Http://blog.zachwaugh.com/post/309927273/programmatically-retrieving-ip-address-of-iphone

ios-Get Model (device model), version (device version number), app (program version number), etc.

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.