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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…