Error: "The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods

ID : 10378

viewed : 29

Tags : cocoapodsrestkit-0.20cocoapods

Top 5 Answer for Error: "The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods

vote vote

91

I was able to fix that by updating CocoaPods.

I. Project Cleanup

  1. In the project navigator, select your project
  2. Select your target
  3. Remove all libPods*.a in Build Phases > Link Binary With Libraries

II. Update CocoaPods

  1. Launch Terminal and go to your project directory.
  2. Update CocoaPods using the command pod install
vote vote

88

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.

vote vote

78

I had been searching for hours and I found solutions as follow:

In my case, method 1 works.

Method 1:

  1. choose the target > go to Build Phases > click Link Binary With Libraries > remove all libPods.a files

  2. open Terminal > direct to your project > run:

      pod install 
  3. clean and build project

ref.1

Method 2:

  1. open Terminal > direct to your project > run:

     pod deintegrate --verbose      pod install --verbose 

ref.2

Method 3:

  1. choose the target > go to Build Settings > click "+" sign

  2. add 2 User-Defined Settings: [to the left = to the right]

     PODS_ROOT = ${SRCROOT}/Pods 

and

    PODS_PODFILE_DIR_PATH = ${SRCROOT}/ 

ref.3

vote vote

66

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.

vote vote

58

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.

Top 3 video Explaining Error: "The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods

Related QUESTION?