ios - Alamofire 和 Swift 3 的更新

标签 ios swift alamofire swift3 xcode8

我刚刚更新到 Xcode 8 和 Alamofire 4.0,我遇到了一些奇怪的错误。第一个是一堆错误,如下所示:

... warning: Missing file: ... is missing from working copy

这适用于 Download.swift、Manager.swift、Stream.swift、Upload.swift 和 Error.swift。如何解决这个问题?

此外,我得到了这个,只用于 alamofire,不用于我的任何其他库:

“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

当我尝试转换它时,我得到了

Could not find test host for FieldSenseAppTests: TEST_HOST evaluates to ..."

最佳答案

我可以通过在 Build Setting 部分将 Use Legacy Swift Language Version 设置为“No”来修复它。

enter image description here

关于ios - Alamofire 和 Swift 3 的更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39528674/

相关文章:

swift - Alamofire.upload SwiftLint 违规

c# - 在 Safari、IE 和 iOS 设备上使用 Fiddler 信任证书并捕获流量

ios - 如何在 Swift 中使用 VoiceOver 更改选择可拖动单元格的行为?

swift - 如何移动没有 titleBar 且完全充满 webView 的窗口?

ios - 如何在 SwiftUI 中制作内阴影

ios - 带有 UITableView 的 UISwipeGestureRecognizer 自定义操作

ios - 为什么 AUNetSend 在 iOS 上不可用? (或任何替代建议)

ios - 始终必须为 .a 文件设置目标成员资格

ios - Swift:NSUserDefaults 没有立即设置

arrays - 从 json 响应中获取前两个索引的数据