IOS gets information about the current app and user information: version number mobile phone number model

Source: Internet
Author: User

  1. Nsdictionary *infodictionary = [[NSBundle mainbundle] infodictionary];
  2. Cfshow (infodictionary);
  3. App Name
  4. NSString *app_name = [infodictionary objectforkey:@"Cfbundledisplayname"];
  5. //App version
  6. NSString *app_version = [infodictionary objectforkey:@"cfbundleshortversionstring"];
  7. //App build version
  8. NSString *app_build = [infodictionary objectforkey:@"Cfbundleversion"];
  9. //Phone serial number
  10. nsstring* identifiernumber = [[Uidevice currentdevice] uniqueidentifier];
  11. NSLog (@"mobile serial Number:%@", identifiernumber);
  12. //Phone alias: User-defined name
  13. nsstring* userphonename = [[Uidevice currentdevice] name];
  14. NSLog (@"phone alias:%@", userphonename);
  15. //Device name
  16. nsstring* devicename = [[Uidevice currentdevice] systemName];
  17. NSLog (@"Device Name:%@", devicename);
  18. //Mobile phone system version
  19. nsstring* phoneversion = [[Uidevice currentdevice] systemversion];
  20. NSLog (@"mobile phone system version:%@", phoneversion);
  21. //Phone model
  22. nsstring* Phonemodel = [[Uidevice currentdevice] model];
  23. NSLog (@"mobile phone Model:%@", Phonemodel);
  24. //local model (internationalized region name)
  25. nsstring* Localphonemodel = [[Uidevice currentdevice] Localizedmodel];
  26. NSLog (@"internationalized Zone Name:%@", Localphonemodel);
  27. Nsdictionary *infodictionary = [[NSBundle mainbundle] infodictionary];
  28. //Current app name
  29. NSString *appcurname = [infodictionary objectforkey:@"Cfbundledisplayname"];
  30. NSLog (@"Current application name:%@", appcurname);
  31. //Current application version such as: 1.0.1
  32. NSString *appcurversion = [infodictionary objectforkey:@"cfbundleshortversionstring"];
  33. NSLog (@"Current application software version:%@", appcurversion);
  34. //Current app version number int type
  35. NSString *appcurversionnum = [infodictionary objectforkey:@"Cfbundleversion"];
  36. NSLog (@"Current application version number:%@", appcurversionnum);

IOS gets information about the current app and user information: version number mobile phone number model

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.