swift - Podfiles 似乎导致了 Xcode 中构建的问题

标签 swift xcode cocoapods project podfile

我目前正在 Xcode 中开发一个项目,使用 Cocoapods 作为插件,其中包括一些插件,例如 GoogleMessagingService。但是,每次编译此项目时,我都会遇到此错误,只有当我从项目中删除 Cocoapods 时,该错误才会消失。

PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/matponting/Library/Developer/Xcode/DerivedData/-----bpdgcivsmcggtlcgfgywekonicxg/Build/Intermediates/----.build/Debug-iphoneos/----.build/Script-5DA7142BEDB6A002149910F5.sh
cd /Users/matponting/Desktop/OriginalCordova/-----Ionic/platforms/ios
/bin/sh -c /Users/matponting/Library/Developer/Xcode/DerivedData/-----bpdgcivsmcggtlcgfgywekonicxg/Build/Intermediates/----.build/Debug-iphoneos/----.build/Script-5DA7142BEDB6A002149910F5.sh    

注意:出于保密原因,我在这里保留了一些命名,因此名称中有些“----”。

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.   

仅当在项目中使用 Cocoapods 时才会出现这些错误,删除后会出现可以解决的不同结果,但我确实需要 Cocoapods 来使我目前正在做的事情。

现在,我研究了这些信息,并发现了多种修复方法,例如使用不同版本的 Cocoapods 清理项目和重新编译。但是,我已经尝试过这些,但仍然遇到同样的错误。

我有什么遗漏吗?

编辑:我也尝试过使用“pod update”,但没有成功。

最佳答案

我认为您的项目缺少 Podfile.lock 文件和 pods 文件夹。

所以请删除您的工作区并尝试再次安装 pod。

关于swift - Podfiles 似乎导致了 Xcode 中构建的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47987213/

相关文章:

ios - Subspec vendored_frameworks 作为另一个 cocoapod 库

ios - 将 Google Analytics 添加到我的 podfile 会破坏构建(找不到库)

ios - 销毁 Controller 后恢复 avplayer

ios - if or/and else if 语句被传递

ios - Xcode:当应用程序在后台运行时间超过 5 分钟时,转到 Storyboard 中的第一页?

iphone - unsignedIntValue 与 intValue

ios - .showsPhysics 的内存泄漏

ios - 如何在其他类中使用导入的HealthKit样本

ios - 界面生成器 : cannot assign custom class to table view controller

ios - Cocoapod 安装后找不到代码签名