IOS 设备信息读取
? ? ? ? ? ? ? ? ? ??let infoDictionary = NSBundle.mainBundle().infoDictionary
?? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? let appDisplayName: AnyObject? = infoDictionary!["CFBundleDisplayName"]
?? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? let majorVersion : AnyObject? = infoDictionary! ["CFBundleShortVersionString"] //主程序版本號
?? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? let minorVersion : AnyObject? = infoDictionary! ["CFBundleVersion"]? //版本號
?? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? let appversion? = String(majorVersion)
?? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? 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
?? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? print("infoDictionary%@,appDisplayName:%@,majorVersion:%@minorVersion:%@appversion:%@iosversion:%@identifierNumber:%@systemName:%@model:%@localizedModel:%@",infoDictionary,appDisplayName,minorVersion,minorVersion,appversion,iosversion,identifierNumber,systemName,model,localizedModel)
總結
以上是生活随笔為你收集整理的IOS 设备信息读取的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python 访问需要HTTP Basi
- 下一篇: usb device selection