Sourav Das
Sourav Das

Reputation: 11

Command PhaseScriptExecution failed with a nonzero exit code - Operation not permitted(Xcode 15)

While building Unity project on Xcode 15.0.1, facing this issue.

Here is the error line from project log

/Users/Library/Developer/Xcode/DerivedData/Unity-iPhone-bxhcpbteoqoprmegtvmvbluhwtqd/Build/Intermediates.noindex/Unity-iPhone.build/Debug-iphoneos/GameAssembly.build/Script-C62A2A42F32E085EF849CF0B.sh: line 19: /Users/IOS/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp: Operation not permitted Command PhaseScriptExecution failed with a nonzero exit code

Following is my Run Script code

HOST_ARCH=$(uname -m)
IL2CPP_DIR="$PROJECT_DIR/Il2CppOutputProject/IL2CPP/build/deploy_$HOST_ARCH"
IL2CPP="$IL2CPP_DIR/il2cpp"
chmod +x "$IL2CPP"
if [ "$HOST_ARCH" = "arm64" ];
then
HOST_ARCH_BEE="arm64"
else
HOST_ARCH_BEE="x64"
fi
chmod +x "$IL2CPP_DIR/bee_backend/mac-$HOST_ARCH_BEE/bee_backend"
if [ "$CONFIGURATION" = "Debug" ];
then
IL2CPP_CONFIG="Debug"
else
IL2CPP_CONFIG="Release"
fi
"$IL2CPP" --compile-cpp --platform=iOS --baselib-directory="$PROJECT_DIR/Libraries" --additional-defines=IL2CPP_DEBUG=0 --incremental-g-c-time-slice=3 --dotnetprofile=unityaot-macos --profiler-report --print-command-line --external-lib-il2-cpp="$PROJECT_DIR/Libraries/libil2cpp.a" --generatedcppdir="Il2CppOutputProject/Source/il2cppOutput" --architecture=arm64 --outputpath="$CONFIGURATION_BUILD_DIR/libGameAssembly.a" --cachedirectory="$CONFIGURATION_TEMP_DIR/artifacts/arm64" --configuration="$IL2CPP_CONFIG"

Any help is much appreciated.

Upvotes: 1

Views: 491

Answers (1)

Nike Kov
Nike Kov

Reputation: 13734

Remove extended attributes from folder with project. For /Users/IOS/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp: Operation not permitted use:

xattr -rc IOS

Upvotes: 0

Related Questions