Skip to content

Passing the --disable-sandbox for .prebuildCommand parameter via Xcode #7121

@BarredEwe

Description

@BarredEwe

Description

I can't pass the --disable-sandbox for .prebuildCommand parameter via Xcode.

I can pass the argument through the terminal. But in Xcode I get this result and, accordingly, an access error.

/usr/bin/sandbox-exec -p "(version 1)
(deny default)
(import \"system.sb\")
(allow file-read*)
(allow process*)
(allow file-write*
    (subpath \"/private/tmp\")
    (subpath \"/private/var/folders/zd/tempId/T\")
)
(deny file-write*
    (subpath \"/ProjectPath\")
)
(allow file-write*
    (subpath \"/DeriveData/PluginPath\")
)

Expected behavior

I can pass an argument to disable the sandbox, for example, pass other arguments in the build parameters:

//:configuration = Debug
ENABLE_USER_SCRIPT_SANDBOXING = NO

Actual behavior

I can't pass an argument to disable the sandbox via Xcode.

Steps to reproduce

  1. Create a simple plugin .preBuildCommand
  2. Try to write some file to the project directory
  3. Run the plugin via Xcode

Swift Package Manager version/commit hash

Xcode 15.0.1

Swift & OS version (output of swift --version ; uname -a)

swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: arm64-apple-macosx14.0
Darwin mbp-mgrishutin-OZON-HVJ3M22N2Y 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions