My project won't build on Xcode 15. This is happening both locally on my machine and on Xcode Cloud.
I've got a Build Phase script that I use to write my app secrets to the disk after fetching them from the CI. Here's my script:
target_file="./MyProject/SupportingFiles/Secrets.json"
if [[ $CONFIGURATION == "Debug Development" || $CONFIGURATION == "Release Development" ]]; then
cp "./MyProject/SupportingFiles/SecretsDev.json" "$target_file"
echo "Wrote Dev secrets."
elif [[ $CONFIGURATION == "Debug Production" || $CONFIGURATION == "Release Production" ]]; then
cp "./MyProject/SupportingFiles/SecretsProd.json" "$target_file"
echo "Wrote Prod secrets."
fi
But when I build my project, I see this error in the build logs:
cp: ./MyProject/SupportingFiles/SecretsDev.json: Operation not permitted
Wrote Dev secrets.
It looks like that for some reason, Xcode 15 now enforces some kind of disk access restriction.
What can I do to make this script work in Xcode 15 in a way that will work both on my machine and also on Xcode Cloud?
Thank you in advance.
ENABLE_USER_SCRIPT_SANDBOXING needs to be no
same question here: error while build iOS app in Xcode : Sandbox: rsync.samba (13105) deny(1) file-write-create, Flutter failed to write to a file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With