Reputation: 1974
I am new in IOS development and git. I am having a problem after merging my local repo to the dev repo. After merging when I build the project I get an error in the Xcode that says, "The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation."
I searched about this and tried the usual solution reinstalling the pods. But executing
pod install
I get another error in terminal that says
At this point I tried deleting the files associated with the "FTPopOverMenu" pod and reinstalling with pod install. The error doesn't go away. Also, I tried solving it in this way - Error:“The sandbox is not in sync with the Podfile.lock…” after installing RestKit with cocoapods
But both error in the Xcode and in the terminal still remains. I'm new to IOS and Git. I really don't understand what is really happening here.
Upvotes: 75
Views: 89830
Reputation: 4739
I am new to iOS and mobile development and was facing this error.
The below command worked, not exactly sure which piece fixed the problem (as there are different commands)
I had tried few of them independently to no luck. But post this command the project build perfectly fine, so its going to my cheatsheet.
cd ios/ &&
pod deintegrate || true &&
pod cache clean --all || true &&
rm -rf Pods || true &&
rm Podfile.lock || true &&
pod install --repo-update || true
Upvotes: 0
Reputation: 5283
if you are facing this error in Flutter CocoaPods could not find compatible versions for pod
cd ios
and then rm -rf Pods/ Podfile.lock ; pod install
flutter build ios
Upvotes: 2
Reputation: 2072
In .podfile
changed the iOS version
platform :ios, '13.0' // Warning change by your desired
It worked
Upvotes: 11
Reputation: 1758
In my case it worked after I changed iOS version from 8.0 to 9.0 in Target (not Project) settings >> General >> Deployment Info
Upvotes: 5
Reputation: 21
Look at the iOS Deployment Target, make it 11.0 and then do
pod install
and it will be fixed
Upvotes: 0
Reputation: 273
please check your podfile and update the platform to the appropriate version number
platform :ios, '11.0'
Upvotes: 7
Reputation: 1355
As per my guess you are working on an old project means which is already developed in Xcode 8 series and now you are working with latest Xcode and you have updated the code accordingly.
So just do the below steps:
It will remove all old cocoapods traces.
OR Alternate way to do it (Temp Work Around)
Upvotes: 76
Reputation: 2315
I have an answer regarding this in the thread already. But this time my scenario was different. My co-worker accidentally updated the cocoa version from the stable to a beta version, while I was using the lower stable version. I wasn't interested using the beta version, so I didn't update.
As deleting podfile.lock
is dangerous which leads to removing the Cocoapods traces, I just opened podfile.lock
in editors like Sublime Text, and downgraded the pod which is causing the problem.
Upvotes: 0
Reputation: 1946
Please check the line below in your Podfile. Please make sure it is commented. it works for me.
platform :ios, '9.0'
Upvotes: 1
Reputation: 1576
First, check your Podfile.lock and make sure no conflict with the spec constraints.
I encounter this issue with strange pod dependency, and solve it by
1. remove Podfile.lock
2. pod install
again
It just work like magic. I think it is a bug that cocoapods cannot solve this kind of constraints in Podfile.lock. Remove the old Podfile.lock can make it apply the new rule easily.
Upvotes: 30
Reputation: 2315
if @Ravi Panchal's answer can't solve your problem, it may be your pod repo is out dated
Solution:
pod install --repo-update
Upvotes: 38
Reputation: 3635
I fixed by a change to dynamic pod version.
And delete file Podfile.lock
Upvotes: 1
Reputation: 1341
In my case pod repos were outdated, solved with pod repo update
Upvotes: 53
Reputation: 2421
I had the same issue with FIRMessaging
from cocoapods
. I solved the issue by doing like following steps
FTPopOverMenu
from your podfile
which can find in your project folder.pod install
. You can see in terminal that FTPopOverMenu
will be removing from your pods.podfile
and write this pod 'FTPopOverMenu'
. Run pod install
in terminal.The error will go away from terminal.
Upvotes: 2