-1 Unity转Xcode打包
一旦报错,首先想想自己Unity工程名和路径有没有中文。
一旦报错,首先想想自己Unity工程名和路径有没有中文。
一旦报错,首先想想自己Unity工程名和路径有没有中文。
0 报错这原因有很多种,这里只是其中一种
原因有很多。找好久才找到解决方法,记录一下免得忘记
1 情况
xcode打包时报错Command PhaseScriptExecution failed with a nonzero exit code 。
报错代码上面有指向MapFileParser.sh这个文件的
例如下面
/Users/xxx/Library/Deve loper/Xcode/DerivedData/Unity-iPhone-cdewarxkdigbngevcbokloxswv/Build/Intermediates-moindexUnity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework,
build/Script-9D3DC87A22D90AB00B296B-sh: Line 2:
/Usersderek/Desktop/Dxxx/MapFileParser.sh: Permission denied
2 解决方法
Target选择UnityFramework->Build Phases
删除 RunScript
Ps:这个文件的代码,删除并没有什么影响
#!/bin/sh
if [ "$UNITY_SCRIPTING_BACKEND" = "il2cpp" ]
then
if [ -f "$PROJECT_DIR/MapFileParser" ]
then
if [[ $ARCHS == *"armv7"* ]]
then
"$PROJECT_DIR/MapFileParser" -format=Clang "$TARGET_TEMP_DIR/$PRODUCT_NAME-LinkMap-$CURRENT_VARIANT-armv7.txt" "$PROJECT_DIR/Data/Managed/SymbolMap-32"
fi
else
echo "The MapFileParser utility was not found in the directory '$PROJECT_DIR'. Managed stack traces may not be reported correctly. This usually happens when the Unity project is built with a Windows editor, then the Xcode project is copied to OSX to build for the target device. You can work around this issue by manually copying the MapFileParser executable from an OSX installation of the Unity editor into the '$PROJECT_DIR' directory."
fi
fi