[英]Compilation error when trying to get system version in Xcode 7 beta 4
I am getting the following error when i try to get the system version 尝试获取系统版本时出现以下错误
//let Device = UIDevice.currentDevice() //this line also cause a compilation error
let iosVersion = NSString(string: Device.systemVersion).doubleValue
Command /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 命令/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失败,退出代码为1
try this 尝试这个
let theDevice = UIDevice.currentDevice().systemVersion
this will give you 9.0.1 for example for ios 9.01 这将为您提供9.0.1,例如ios 9.01
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.