I’m building a React Native 0.72.10 iOS app and hitting build errors.
Environment:
macOS: Apple M4, Sequoia 15.7.2
Xcode: 26.1.1
React Native: 0.72.10
Errors:
Could not delete /Users/.../ios/build because it was not created by the build system
Unable to write file '/Users/.../ios/build/Pods.build/Debug-iphonesimulator/...': Operation not permitted
(Multiple Pods / React Native framework headers affected)
What I’ve tried:
bash
rm -rf ios/build
rm -rf ~/Library/Developer/Xcode/DerivedData
xattr -w com.apple.xcode.CreatedByBuildSystem true ios/build
pod deintegrate && pod install
sudo chown -R $(whoami) ios/build
Observations:
ios/build is recreated automatically.
Some files have com.apple.xcode.CreatedByBuildSystem: true.
3.Xcode have Full disk access authorisation.
Why does Xcode fail to delete / write to ios/build even though it’s recreated automatically by the build system?
Is this caused by Xcode itself, macOS permissions?
Any recommended fix or workaround for these “Operation not permitted” errors?
Selecting any option will automatically load the page