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

后端 未结 30 2229
小蘑菇
小蘑菇 2020-11-27 10:12

I\'ve encounter an strange issue after installing RestKit with cocoapods. after resolving RestKit dependency for my project with cocoapods and trying to build it, I face thi

相关标签:
30条回答
  • 2020-11-27 10:28

    If you are seeing an error like the following:

    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.

    Then there's a problem with Cocoapods in your project. Sometimes cocoapods can get out of sync and you need to re-initiate cocoapods. You should be able to resolve this error by:

    1. Deleting the Podfile.lock file in your project folder
    2. Deleting the Pods folder in your project folder
    3. Execute 'pod install' in your project folder
    4. Do a "Clean" in Xcode
    5. Rebuild your project
    0 讨论(0)
  • 2020-11-27 10:29

    I encountered this issue with a misconfigured xcconfig file.

    The Pods-generated xcconfig was not correctly #included in the customise xcconfig that I was using. This caused $PODS_ROOT to not be set resulting in the failure of diff "/../Podfile.lock" "/Manifest.lock", for obvious reasons, which Pods misinterprets as a sync issue.

    0 讨论(0)
  • 2020-11-27 10:29

    If you are applying to the way Project Cleanup and your project still error.

    You can go to tab Build Phases and then Find Check Pods Manifest.lock and remove the script.

    Then type command to remove folder Pods like that rm -rf Pods

    and then you need to remove Podfile.lock by command rm Podfile.lock

    Probably, base on a situation you can remove file your_project_name.xcworkspace

    Finally, you need the command to install Pod pod install --repo-update.

    Hopefully, this solution comes up with you. Happy coding :)

    0 讨论(0)
  • 2020-11-27 10:31

    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 Phrases > 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

    0 讨论(0)
  • 2020-11-27 10:34

    I had the same issue with Ionic-3, I did some above mention steps but none of them worked for me.

    For Ionic Remove the ios platform

    $ ionic cordova platform remove ios
    $ ionic cordova platform add ios
    

    Open xcode then try to build. this worked for me :-)

    0 讨论(0)
  • 2020-11-27 10:35

    My problem was the cocoa pods version so I installed the latest with: sudo gem install cocoapods --pre Then pod update

    That worked for me

    0 讨论(0)
提交回复
热议问题