error:Multpile commands produce That command depends on command in Target ‘HearingPod’: script phase “[CP] Copy Pods Resources

error:That command depends on command in Target ‘HearingPod’: script phase “[CP] Copy Pods Resources”

Xcode 10變更一些編譯規則及方法,第一要解決的就是與CocoaPods的機制,編譯時會出現:

error: Multpile commands produce.........That command depends on command in Target 'HearingPod': script phase “[CP] Copy Pods Resources

這個一開始很傷腦,不知道發什麼問題,最後查一下資料得到的結論是CocoaPods會有Script將用到的資源Copy至專案下,但目前的Xcode 10似乎不需要再這麼處理,解決方法如下:

Xcode 10開啟你的專案,並選擇你專案的名稱,不要指向Pods,前往Build Phase項目後再往下找到Output Files會看到如下的內容:

${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}

將它刪除後再重新Build就能解決。

參考資料

Xcode 10 的坑:Multiple commands produce

Xcode 10 beta3 Error: Multiple commands produce