ios - Xcode 12 问题 - 找不到目标 'FrameworkName' 的模块 'arm64-apple-ios-simulator';找到 : x86_64-apple-ios-simulator, x86_64

标签 ios swift xcode12

更新到 Xcode 12 后,项目在模拟器上构建时给了我这个错误:

Could not find module 'FrameworkName' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64
该框架与 cocoapods 一起安装。
它适用于 Xcode 11。在“任何 iOS 设备”或带有 Xcode 12 的真实 iPhone 上构建也可以正常工作。
Xcode 12 有什么不同?

最佳答案

我通过确保build设置 VALID_ARCHS 解决了这个问题(现在出现在 Xcode 12 中build设置的底部)包含“x86_64”。
那是:

  • 之前我有:VALID_ARCHS = arm64, arm64e
  • 修复后:VALID_ARCHS = arm64, arm64e, x86_64

  • (有点违反直觉,因为错误消息说它找不到 arm64 -apple-ios-simulator 的模块,:shrug:)

    关于ios - Xcode 12 问题 - 找不到目标 'FrameworkName' 的模块 'arm64-apple-ios-simulator';找到 : x86_64-apple-ios-simulator, x86_64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64026065/

    相关文章:

    react-native - 一旦 cocoapods 从 Podfile 安装 react-native-mapbox-gl,Xcode 就会成功构建损坏的存档,而不显示在组织器中

    swift - 在 SwiftUI 中使用参数初始化 @StateObject

    ios - Swift 协议(protocol)与 objective-c ViewController 类交互

    ios - Swift -如何在具有多个部分的 collectionView 上执行批量更新

    swift - 在 Swift 中将 cookie 添加到 webview.load

    file - 如何为 xip temp 选择文件夹位置

    ios - Cocoapods 每次都需要通过 dropbox 同步在不同的计算机上更新 bolts 框架

    ios - iOS 中有没有办法接收钥匙串(keychain)条目已更改的通知?

    ios - 我现有的 TableViewController 在 Xcode 11 beta1 上崩溃

    ios - 将 Swift 导入 Objective-C - "use of undeclared identifier"