标签:style blog color io os ar for sp div
swift 获取app版本号及 ios 版本号
func versionCheck(){
let infoDictionary = NSBundle.mainBundle().infoDictionary
let appDisplayName: AnyObject? = infoDictionary["CFBundleDisplayName"]
let majorVersion : AnyObject? = infoDictionary ["CFBundleShortVersionString"]
let minorVersion : AnyObject? = infoDictionary ["CFBundleVersion"]
let appversion = majorVersion as String
let iosversion : NSString = UIDevice.currentDevice().systemVersion //ios 版本
let identifierNumber = UIDevice.currentDevice().identifierForVendor //设备 udid
let systemName = UIDevice.currentDevice().systemName //设备名称
let model = UIDevice.currentDevice().model //设备型号
let localizedModel = UIDevice.currentDevice().localizedModel //设备区域化型号 如 A1533
println(appversion)
}
majorVersion 主程序版本号
minorVersion build 版本号
标签:style blog color io os ar for sp div
原文地址:http://www.cnblogs.com/ericjun/p/4012479.html