when integrate cocoapods, project can not build
after integrate with cocoapods, the project can build and run
Steps to reproduce:
cocoapods project profile:
target 'MyIonic2Project' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MyIonic2Project
pod 'AFNetworking'
end
xcode build error:
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.
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
cocoapods version: 1.1.1
Which Ionic Version? 1.x or 2.x
2.x
Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.36
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X Sierra
Node Version: v4.6.0
Xcode version: Xcode 8.1 Build version 8B62
Thanks!
Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum. Thanks for using Ionic!
any updates with cocoapods support?
Anyone managed to make cocoapods work? Thanks!
I'm having the issue as well.
cd platforms/ios
rm -rf Pods
rm -rf Podfile.lock
pod install
xcode
product-> clean
product-> build o run
or

Hi All,
Having the same issue. I've tried "pod install" and "pod update"
Also tried the above solution. I had 4 errors, it was saying there is no .lock file.
Down to 2 errors now with the above solution:
diff: /Podfile.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.
Any ideas?
I also got the same two errors after trying @rabernet solution. I added the user-defined setting PODS_ROOT but kept getting the same two errors over and over.
Ultimately, the problem seemed to be PODS_ROOT was not being saved/recognized because it's now working with no additional changes.
Doing the following also resolved the errors but it wasn't necessary after PODS_ROOT started working correctly.
In XCode, click on the target project, select the "Build Phases" tab, open the "[CP] Check Pods Manifest.lock" option and replace the following code:
from:
diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
to:
diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null
@rabernet saved my life.!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
cd platforms/ios
rm -rf Pods
rm -rf Podfile.lock
pod install
xcode
product-> clean
product-> build o run
or