Xcode 16 warning on framework with unsandboxed preBuildScripts
From Xcode 16, a warning appears for all our framework targets:
tasks in 'Copy Headers' are delayed by unsandboxed script phases; set ENABLE_USER_SCRIPT_SANDBOXING=YES to enable sandboxing
When moving the run script (added with "preBuildScripts") AFTER the Headers phase, the warning disappears.
Hey @shuguenot , did you find any other solution than that? I am also getting the same warning on my project
@jawidan It seems to be the only (and right) way to solve this warning. Note that the warning message is pretty explicit, right?
I am convinced that this is an issue that should be addressed by XcodeGen, specifically in how it manages the build phase order as described.
It seems easy change technically as code is quite straightforward on how the order is determined: https://github.com/yonaskolb/XcodeGen/blob/2cf88e8088b6c1531080b10d2bfb169e2dc22379/Sources/XcodeGenKit/PBXProjGenerator.swift#L1126
But there is additional phase between prebuild scripts and headers: copyFilesBuildPhasesFiles. Does anyone know if that could also go after headersBuildPhaseFiles?