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