在尝试了谷歌的多个答案后,我遇到了以下错误。
PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/apple/Library/Developer/Xcode/DerivedData/Build/Intermediates/FoodSpot.build/Debug-
iphonesimulator/FoodSpotTests.build/Script-36819C3C1B6A30F50091382D.sh
cd "/Users/apple/Downloads/FoodSpot 2"
/bin/sh -c /Users/apple/Library/Developer/Xcode/DerivedData/Build/Intermediates/FoodSpot.build/Debug-iphonesimulator/FoodSpotTests.build/Script-36819C3C1B6A30F50091382D.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.
我已经更新、安装了很多次了,但是没有用。
对我来说,原因是构建设置中缺少用户定义的变量!
为了研究这个问题,构建阶段尝试比较 2 个文件。
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
只是因为缺少 PODS_PODFILE_DIR_PATH 和 PODS_ROOT 变量,假设它们为“”,因此 ${PODS_PODFILE_DIR_PATH}/Podfile.lock 指向 /Podfile.lock ,另一个也相同。
所以它失败了
diff /Podfile.lock and /Manifest.lock
我通过在构建设置中添加 2 个用户定义的设置来修复此问题
PODS_ROOT = ${SRCROOT}/Pods
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
经过几个小时的搜索,这是唯一对我有用的解决方案
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)