2014-04-01 139 views

回答

1

我發現你需要project.pbxproj編輯

包括那些臺詞:

E0F2945D18DC83D9006CC8FE是你的目標ID

在/ *開始PBXNativeTarget部分*/

更新構建階段:

buildPhases = (
      E0F2928A18DC83D9006CC8FE /* Check Pods Manifest.lock */, 
      E0F2928A18DC83D9006CC8FE /* Sources */, 
      E0F2930018DC83D9006CC8FE /* Frameworks */, 
      E0F2932118DC83D9006CC8FE /* Resources */, 
      E0F2945D18DC83D9006CC8FE /* ShellScript */, 
      E0F2945E18DC83D9006CC8FE /* CopyFiles */, 
      E0F2945E18DC83D9006CC8FE /* Copy Pods Resources */, 
      ); 

然後

/* Begin PBXShellScriptBuildPhase section */ 
     E0F2945D18DC83D9006CC8FE /* ShellScript */ = { 
      isa = PBXShellScriptBuildPhase; 
      buildActionMask = 2147483647; 
      files = (
      ); 
      inputPaths = (
      ); 
      outputPaths = (
      ); 
      runOnlyForDeploymentPostprocessing = 0; 
      shellPath = /bin/sh; 
      shellScript = ""; 
     }; 
     E0F2945D18DC83D9006CC8FE /* Copy Pods Resources */ = { 
      isa = PBXShellScriptBuildPhase; 
      buildActionMask = 2147483647; 
      files = (
      ); 
      inputPaths = (
      ); 
      name = "Copy Pods Resources"; 
      outputPaths = (
      ); 
      runOnlyForDeploymentPostprocessing = 0; 
      shellPath = /bin/sh; 
      shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n"; 
      showEnvVarsInLog = 0; 
     }; 
     E0F2945D18DC83D9006CC8FE /* Check Pods Manifest.lock */ = { 
      isa = PBXShellScriptBuildPhase; 
      buildActionMask = 2147483647; 
      files = (
      ); 
      inputPaths = (
      ); 
      name = "Check Pods Manifest.lock"; 
      outputPaths = (
      ); 
      runOnlyForDeploymentPostprocessing = 0; 
      shellPath = /bin/sh; 
      shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 
      showEnvVarsInLog = 0; 
     }; 
/* End PBXShellScriptBuildPhase section */ 
1

這種情況以前也發生在我身上。我發現,從你的項目/文件夾刪除的CocoaPods的所有痕跡,然後做一個pod install,它把後面所有的構建階段等

我的步驟:

  • 刪除工作區
  • 刪除文件夾豆莢
  • 刪除Podfile.lock文件
  • 從構建階段選項卡上,目標您正在使用的,去掉「檢查莢Manifest.lock」構建階段(這將是唯一的CocoaPods建設階段左因爲資源步驟已經到了b例如with)
  • 在構建設置選項卡下,對於您正在處理的目標,請移除任何Cocoapods路徑等,以確保安全。當開始使用Cocoapods並且還沒有完全理解它時,我也執行了這一步,以確保我從一個乾淨的石板開始。
+0

你可以刪除'PODS_ROOT'設置嗎?我嘗試將值替換爲'nil',但是當'pod install'ing:'MyApp [Debug]'target覆蓋'Pods/Target Support Files/Pods/Pods/Pods.debug.xcconfig',這可能會導致CocoaPods安裝出現問題。「 我不知道如何'從目標中刪除構建設置。' – Colas

+0

刪除工作區會自動刪除此設置。如果通過打開工作區來訪問它,則不可能刪除此設置。 – Colas

1

我只是簡單地創建一個「運行腳本階段」,將其命名爲「複製莢資源」和加入解決了這個:

"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" 

爲我工作。

相關問題