Xcode build Share extension error for react native.
Sandbox: bash(72986) deny(1) file-write-data /Users/XXX/ios/Pods/resources-to-copy-XXXShareExtension.txt
I have tried to rebuild many times and still get an error........
update your Xcode project build option 'ENABLE_USER_SCRIPT_SANDBOXING' to 'No'.

This solution works also for ionic projects for the error: deny(1) file-read-data
update your Xcode project build option 'ENABLE_USER_SCRIPT_SANDBOXING' to 'No'.
This error indicates that SwiftLint does not have permissions to read the specified file. To resolve such an error, you can follow these steps:
ls -l /Users/Your Name/Your Projects/Pods/SwiftLint/swiftlint
If the file has limited permissions or lacks read permission, you may need to adjust the permissions.
Navigate to Targets -> Project -> Build Settings -> Choose (All and Combined) -> User Script Sandboxing. Change the option from "Yes" to "No".
OR
Search 'ENABLE_USER_SCRIPT_SANDBOXING'
If you are facing this CI pipeline issue with React Native recently, it is due to the Xcodeproj gem update to 1.26.0. As a patch, pin the gem version to <1.26.0 to resolve it.
There were two User Script Sandboxing settings, one on the target and one on the app. I had to set both to No.