iOS 'The sandbox is not sync with the Podfile.lock

問題描述:
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命令。
相關文章
相關標籤/搜索