github下載的Demo,很多時候使用到CocoaPods,有的時候因為依賴關系或者版本問題不能編譯運行。出現例如The sandbox is not sync with the Podfile.lock
問題時候,如下所示
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.`
關閉當前的工作空間,刪除掉文件夾中的workspace,然後重新pod install,install完成之後,通過workspace打開工作空間,clean+build即可,如下所示
rm -rf MyProject.xcworkspace
pod install
在pod install之前,請確保已經執行pod setup命令。