1. 程式人生 > >[紹棠_Swift] Swift3.0中如何獲取Info.plist檔案資訊

[紹棠_Swift] Swift3.0中如何獲取Info.plist檔案資訊

let APP_NAME = Bundle.main.infoDictionary!["CFBundleName"] as! String

let APP_VERSION = Bundle.main.infoDictionary!["CFBundleShortVersionString"]as!String

let kAgient = APP_NAME+APP_VERSION

let APP_DEV = "iPhone"

let versionCode = UIDevice.current.model

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