ios - 尝试在 Xcode 上运行 UI 测试时出现 "Module file was created by an older version of the compiler"消息

标签 ios xcode swift xcode7 xcode-ui-testing

我正在尝试对我的旧项目进行一些 UI 测试。 我创建了一个 UI 测试目标并在测试 Swift 文件的顶部添加了 @testable import MyOlderProject

我收到以下错误消息:

Module file was created by an older version of the compiler; rebuild 'MyOlderProject' and try again

看起来它与 MyOlderProject.swiftmodule/arm.swiftmodule 有关。

我做错了什么?

最佳答案

您是否尝试过升级到 Xcode 7 GM 并使用最新的 swift 编译器构建您的应用程序? 这可能是从这里发出的警告信号,

"To be safe, all components of your app should be built with the same version of Xcode and the Swift compiler to ensure that they work together."

https://developer.apple.com/swift/blog/?id=2

关于ios - 尝试在 Xcode 上运行 UI 测试时出现 "Module file was created by an older version of the compiler"消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32626309/

相关文章:

ios - 为什么未签名的 xcarchive 比签名的大?

swift - 我无法在 Xcode 6 中使用 Swift 添加加速度计

ios - IQkeyboardManager 库中的完成按钮不可见

ios - Mac OS-使用适用于iOS/Mac OS的iCloud创建Finder同步扩展

ios - 一个 UIViewController 中的自定义单元格表格 View 和默认 UITableView

ios - CIFaceFeature hasSmile 始终为 false

swift - 如何显示输入密码并重试警报 View

objective-c - 持久存储的核心数据错误

ios - 在运行时添加 UI 元素的问题

当 Swift 文件包含在框架中时,不会编译前缀项目文件头中的 Objective-C 宏