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

后端 未结 30 2227
小蘑菇
小蘑菇 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:21

    Completely nothing worked out for me from these answers. Had to create the project again by running cordova platform add ios. What I've noticed, even freshly generated project with (in my case) Firebase pods caused the error message over and over again. In my opinion looks like a bug for some (Firebase, RestKit) pods in Xcode or CocoaPods. To have the pods included I could simply edit my config.xml and run cordova platform add iOS, which did everything for me automatically. Not sure if it will work in all scenarios though.

    Edit: I had a Podfile from previous iOS/Xcode, but the newest as of today have # DO NOT MODIFY -- auto-generated by Apache Cordova in the Podfile. This turned on a light in my head to try the approach. Looks a bit trivial, but works and my Firebase features worked out.

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

    For me the problem was that I made a new target in my app by duplicating an existing one, but forgot to add the target to the Podfile. For some reason, the cloned target did work for days without problems, but after a while it failed to build by this error. I had to create a new target entry for my cloned project target in the Podfile then run pod install.

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

    I faced this problem in a Flutter project. I just opened iOS Module in xCode and Build Clean Folder worked for me.

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

    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.

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

    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.

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

    This made my day!

    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)
提交回复
热议问题