I modified this open source with Xcode 3.0, but as soon as I upgraded my Xcode to 4.0+ and tried to run it, it no longer worked. The first mistake I came across is
/Users/newperson/Library/Developer/Xcode/DerivedData/Hellcraft-etesgjzdmfzimlgvakidckjecgij/Build /Intermediates/Hellcraft.build/Debug-iphonesimulator/Doom.build/Script- 435F41A90F532CA300887552.sh: line 3: /Applications/Xcode.app/Contents/Developer/Libra/PrivateFrameworks /DevToolsCore.framework/Resources/pbxcp: No such file or directory
I figured this was related to Run Script in the build phases, which is set as follows:
/bin/sh -x PBXCP=${DEVELOPER_DIR}/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp ${PBXCP} -exclude .svn "${PROJECT_DIR}/../../base" "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
But after searching the Internet and changing the Shell script countless times, I could not find a solution. I found somewhere that pbxcp was removed in later versions of Xcode, but I cannot find a suitable replacement and cannot include this DevToolsCore in the new version of Xcode.
After searching for a forum that said I had to run an alternative Script to do makeup for the missing pbxcp file, I tried to run this:
/usr/bin/tar -c -C "${PROJECT_DIR}/myframeworks" --exclude .DS_Store --exclude CVS --exclude .svn --exclude .git -H `cd "${PROJECT_DIR}/myframeworks" && find DevToolsCore.framework` | /usr/bin/tar -x -C ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}
I created a file called myframeworks in the project directory and added DevToolsCore.framework to it, although this fixed the missing pbxcp problem, causing another error:
tar: could not chdir to '/Users/newperson/Library/Developer/Xcode/DerivedData/Hellcraft- etesgjzdmfzimlgvakidckjecgij/Build/Products/Debug-iphonesimulator/Doom.app/Frameworks' tar: Write error Command /bin/sh failed with exit code 1
If anyone has any advice, it would be great, I pull my hair out.