Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have got the following errors after trying multiple answers from the google.

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.

I have updated and installed many times, but they are of no use.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

For me, the reason was missign User-Defined variables in the Build Settings!

Looking into the issue, the Build Phases tries to diff 2 files.

diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null

Just because of missing PODS_PODFILE_DIR_PATH and PODS_ROOT variables, assumes them as "" so ${PODS_PODFILE_DIR_PATH}/Podfile.lock points to /Podfile.lock and same for the other one.
So it fails in

diff /Podfile.lock and /Manifest.lock

I fixed this by adding 2 User-Defined settings to the Build Settings

PODS_ROOT = ${SRCROOT}/Pods
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

After hours of searching this is the only solution that worked for me


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...