繁体   English   中英

尝试在Xcode 7 Beta 4中获取系统版本时出现编译错误

[英]Compilation error when trying to get system version in Xcode 7 beta 4

尝试获取系统版本时出现以下错误

 //let Device = UIDevice.currentDevice() //this line also cause a compilation error
 let iosVersion = NSString(string: Device.systemVersion).doubleValue

命令/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失败,退出代码为1

尝试这个

let theDevice = UIDevice.currentDevice().systemVersion

这将为您提供9.0.1,例如ios 9.01

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM