Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Xcode 8-Swift 3-中断我的应用程序_Ios_Xcode_Swift3 - Fatal编程技术网

Ios Xcode 8-Swift 3-中断我的应用程序

Ios Xcode 8-Swift 3-中断我的应用程序,ios,xcode,swift3,Ios,Xcode,Swift3,在以前版本的xcode(xcode 8 beta 6)上,我的应用程序运行良好,没有错误。今天早上我更新了xcode,我运行了我的应用程序,现在,我有400个错误! 安装的吊舱不工作,我的代码都是红色的 我对更新感到有点沮丧,这导致了我的应用程序被破坏 我如何解决我的处境 现在不工作的代码示例: if UserDefaults.standard.string(forKey: "token") != nil => Use of unresolved identifier if( CLL

在以前版本的xcode(xcode 8 beta 6)上,我的应用程序运行良好,没有错误。今天早上我更新了xcode,我运行了我的应用程序,现在,我有400个错误! 安装的吊舱不工作,我的代码都是红色的

我对更新感到有点沮丧,这导致了我的应用程序被破坏

我如何解决我的处境

现在不工作的代码示例:

if UserDefaults.standard.string(forKey: "token") != nil => Use of unresolved identifier 

 if( CLLocationManager.authorizationStatus() == CLAuthorizationStatus.authorizedWhenInUse => Type CLAuthorizationStatus has no member authorizedWhenInUse

运气不好,我不得不快速添加一个更新,以纠正在启动时崩溃的应用商店版本…

最新版本的Xcode,Xcode 8 beta或Xcode 8 GM seed,运行在更新更快的Swift版本上。您的错误可能是因为您的命令字符串现在太长。如果无法转换文件,则可能需要进入并编辑每个命令行。请参阅最新版本Xcode的发行说明,您必须找到这些新语句

例如:

// old code (Swift 2.2)
let content = text.stringByTrimmingCharactersInSet(NSCharacterSet.newlineCharacterSet())

// new code (Swift 3.0)
let content2 = text.trimmingCharacters(in: .newlines)
资源: