Reprint: http://blog.sina.com.cn/s/blog_7b9d64af0101bu9j.html
Many times, we need to get the user's iphone version number, or the app's current version number. Care about the following two aspects: first, the application logic will be based on the iphone hardware version number to deal with the corresponding! Second, we need to get the current version of our app because of some kind of demand.
first, obtain the hardware version number of the client user
Determine the iOS version number of the device
float Version = [[[Uidevice Currentdevice] systemversion] floatvalue];
NSLog (@ "%f", version);
Second, we can also obtain more appropriate equipment information
NSLog (@ "%@", [[Uidevice Currentdevice] name]); Name of the phone as named by user
NSLog (@ "%@", [[Uidevice Currentdevice] uniqueidentifier]); A GUID like string
NSLog (@ "%@", [[Uidevice Currentdevice] identifierforvendor]); A GUID like string (IOS 6.0)
NSLog (@ "%@", [[Uidevice Currentdevice] systemName]); "IPhone OS"
NSLog (@ "%@", [[Uidevice Currentdevice] systemversion]); "5.1.1"
NSLog (@ "%@", [[Uidevice Currentdevice] model]); "IPhone" on both devices
NSLog (@ "%@", [[Uidevice Currentdevice] localizedmodel]); "IPhone" on both devices
Third, get the app version number
Get the version number of the software,
nsdictionary* infodict =[[nsbundle Mainbundle] infodictionary];
float Softverson =[[infodict objectforkey:@ "cfbundleshortversionstring"] floatvalue];
Reads the information for the Info.plist file.
nsdictionary* infodict =[[nsbundle Mainbundle] infodictionary];
Ios-iphone System version number-iphone app version number