If you run into this with your projects, it sounds like a better fix is to specify the specific input and output files so that the script phase is allowed access only to the files you think it should be working with. Luckily when I searched the build settings for the word “sandbox” it turned up the setting, and I was able to turn it off. I had added a custom Run Script phase to my project in order to finesse the contents of the built product, but when the script ran I was greeted with this error:Įrror: Sandbox: cp(25322) deny(1) file-read-data /Users/daniel/Project/File.txt How was I reminded? Because evidently, starting in Xcode 15, the build setting now defaults to YES. ![]() ![]() For example, Xcode must build a custom framework before it builds an app that links against that framework. If I noticed it last year I had already forgotten about it, but I was reminded today while putting together a sample app to demonstrate a bug I was reporting. Xcode builds targets in parallel when it can, but sometimes it must build targets serially. Xcode builds multiple dependent targets in parallel when possible. The order of the targets indicates the order in which Xcode starts building them. Specifies other targets, in the same project or a referenced project, that Xcode must build before it builds the current target. ![]() When enabled, the build fails with a sandbox violation if a script phase attempts to read from or write to an undeclared dependency, preventing incorrect builds. Xcode supports the following build phases: Dependencies. Sandboxing blocks access to files inside the source root of the project as well as the Derived Data directory unless you list those files as inputs or outputs. You can now enable sandboxing for shell script build phases using the ENABLE_USER_SCRIPT_SANDBOXING build setting. Apple added a new build setting to Xcode last year, ENABLE_USER_SCRIPT_SANDBOXING, which controls whether any “Run Script” build phases will be run in a sandbox or not.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |