尝试将Pod添加到我的Cordova iOS项目时遇到一些错误
我在Xcode中看到的错误是:
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.
我已根据其他Stackoverflow上出现的信息尝试了以下操作。
1:关闭Xcode并运行pod install
2:pod更新
3:删除并重新安装可可豆荚
4:创建一个新项目
我的项目的结构为/platform/ios
,我正在尝试安装Firebase。这是我完成安装Pod的步骤
1:在上面的文件夹中-pod init2:编辑podfile并添加firebasepodfile内容
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'RandstadJobs' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for RandstadJobs
pod 'Firebase/Core'
end
3:运行pod安装
4:打开Xcode清理并构建
我看到Podfile.lock和Manifest.lock文件。它们在文件夹中,
/platform/ios/Podfile.lock and /platform/ios/pods/manifest.lock
这里是Xcode中的构建阶段设置
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"
似乎未设置路径。
请您提供一些提示以及如何解决此问题
谢谢
我能够通过执行以下操作来传递错误:
在Xcode构建设置中添加2个用户定义变量
1:PODS_ROOT = $(SRCROOT)/ PODS
2:PODS_PODFILE_DIR_PATH = $(SRCROOT)
然后清理项目并编译
您可以尝试清理文件夹
/用户/您的姓名/图书馆/开发人员/ Xcode / DerivedData
我刚遇到问题,因为我更改了项目名称和文件夹路径。