Error: "The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods
Solution 1:
I was able to fix that by updating CocoaPods.
I. Project Cleanup
- In the project navigator, select your project
- Select your target
- Remove all libPods*.a in Build Phases > Link Binary With Libraries
II. Update CocoaPods
- Launch Terminal and go to your project directory.
- Update CocoaPods using the command
pod install
Solution 2:
After many attemps I managed to fix this problem. Variable ${PODS_ROOT} was not set and I do below trick. Go to Build Phases -> Check Pods Manifest.lock and replace
diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
to
diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null
It helps me.
Solution 3:
I had been searching for hours and I found solutions as follow:
In my case, method 1 works.
Method 1:
-
choose the target > go to Build Phases > click Link Binary With Libraries > remove all libPods.a files
-
open Terminal > direct to your project > run:
pod install
-
clean and build project
ref.1
Method 2:
-
open Terminal > direct to your project > run:
pod deintegrate --verbose pod install --verbose
ref.2
Method 3:
-
choose the target > go to Build Settings > click "+" sign
-
add 2 User-Defined Settings: [to the left = to the right]
PODS_ROOT = ${SRCROOT}/Pods
and
PODS_PODFILE_DIR_PATH = ${SRCROOT}/
ref.3
Solution 4:
If you remove all pods from your target in the Podfile, e.g.
target 'myTarget' do
pod 'great-stuff', '~> 4.0' // you deleted this last pod
end
you'll need to manually delete these builds steps from your Xcode target Build Phases:
- Check Pods Manifest.lock
- Copy Pod resources
Cocoapods (current stable version 0.37.2) does not perform this cleanup when you run pod install
.
Solution 5:
Removing pods from the project and re-installing worked for me.
There is nice GitHub repository that can completely remove the pods from the project.
Just keep the backup of your PodFile and run below commands.
- gem install cocoapods-deintegrate
- gem install cocoapods-clean
- Go to the project directory and run pod deintegrate
- Again run pod clean
- Run pod install
Clean and run.