ios - 安装新的 cocoapod 后缺少所需的模块

标签 ios swift cocoapods xcode9

我有一个使用多个自定义框架的项目。这些自定义框架有一些 pod 作为依赖项,如 Alamofire、SwiftKeychainWrapper 等,所以我将它们安装在我的主项目中。

一切正常,直到我尝试安装新的自定义框架所依赖的新 pod(“RealmSwift”)。安装后出现此错误:

diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

我可以通过为 PODS_PODFILE_DIR_PATHPODS_ROOT 添加两个 USER_DEFINED build设置来解决这个问题(但为什么运行 pod install 会改变这个?)

然后,当我尝试构建时,所有将 Pod 作为依赖项的自定义框架在尝试导入时都会出现此错误:

Example:
Missing required modules: 'Alamofire', 'SwitfKeychainWrapper', etc.

为什么 Xcode 看不到这些模块?它们就在它们之前所在的位置。

我已尽一切努力解决此问题。清理、删除派生数据、分解我的 pod 并重新安装所有这些、编辑导入路径和 header 搜索路径,似乎没有任何效果。

如果有任何帮助,我将不胜感激!

最佳答案

您的 pod 似乎需要更新。 请执行此命令。 ' pods 更新'

关于ios - 安装新的 cocoapod 后缺少所需的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53794803/

相关文章:

ios - 使用 UIImageView 设置缩放 UIScrollView

iphone - 当 autoreleasepool 耗尽时,NSFileAttributes dealloc 中的 SIGSEGV SEGV_ACCERR 崩溃?

ios - Xcode 11 Swift 5 - 无法安装应用程序(无法加载 info.plist 文件)

ios - 如何将 ` use_frameworks!` 用于特定的 cocoapods pod?

ios - UIBezierPath 三角形反转

iphone - 在Friend Wall发表期间Facebook返回com.facebook.sdk错误5

ios - 以编程方式设置标题 View

swift - 使用vapor在Swift中创建REST API无法发出POST请求

swift - 如何在 Swift 中正确进行 Nil 合并?

ios - 添加 Firebase CocoaPods 后无法构建项目