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 systemUnable to write file '/Users/.../ios/build/Pods.build/Debug-iphonesimulator/...': Operation not permitted
(Multiple Pods / React Native framework headers affected)
What I’ve tried:
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/buildis recreated automatically.Some files have
com.apple.xcode.CreatedByBuildSystem: true.
Why does Xcode fail to delete / write to
ios/buildeven though it’s recreated automatically by the build system?Is this caused by Xcode itself, macOS permissions, or a React Native / Pod issue?
Any recommended fix or workaround for these “Operation not permitted” errors?