Skip to content

[macOS 15 · Xcode 15] Sandbox “file-read-data” on generate_sources.sh + 4.2.0 not listed in SPM #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
01H-W-H10 opened this issue May 20, 2025 · 1 comment
Assignees
Labels
more info required Needs more info to become actionable. Auto-closed if no response. question Further information is requested

Comments

@01H-W-H10
Copy link

❗️ What happens

  • ObjectBox 4.2.0 does not appear in Swift Package Manager’s version list (only 4.1.0).
  • After integrating 4.2.0 manually (xcframework ZIP) and following the official Run Script Phase guide, every build fails with a sandbox error:

🔄 Reproduction

  1. macOS 15.4.1 (24E263) + Xcode 15.3.1 (16E300a)
  2. SPM → https://github.com/objectbox/objectbox-swift.git → 4.2.0 not offered.
  3. Download ObjectBox-xcframework-4.2.0.zip and extract to
    Dependencies/ObjectBox/….
  4. Add Run Script Phase (official snippet) and add these Input Files
    $(PROJECT_DIR)/Dependencies/ObjectBox/generate_sources
    $(PROJECT_DIR)/Dependencies/SourceryBin/Sourcery

Sandbox: zsh(94585) deny(1) file-read-data /…/generate_sources.sh
/bin/zsh: can't open input file /…/generate_sources

  1. Install Sourcery 1.9.2 CLI → Dependencies/SourceryBin/Sourcery
    (exec bit + quarantine cleared).
  2. Build → sandbox denial above.

🛠️ Tried / no luck

Attempt Result
chmod +x on generate_sources*, OBXCodeGen, Sourcery
xattr -dr com.apple.quarantine on whole Dependencies
Adding …/OBXCodeGen.framework/OBXCodeGen to Input Files
Using Sourcery 2.2.7 (Homebrew) instead of 1.9.2

📋 Environment

Item Value
macOS 15.4.1 (Sequoia)
Xcode 15.3.1 (16E300a)
Swift 5.10
ObjectBox 4.2.0 (manual xcframework)
Sourcery 1.9.2 CLI

📎 Full log excerpt

click to expand

🙏 Questions

  1. Why is 4.2.0 missing from the SPM version list?
  2. Is there an updated Run Script Phase example that works with Xcode 15 sandboxing?
  3. Any known incompatibility between Sourcery ≥1.9 and ObjectBox 4.2 on macOS 15?

Thanks for looking into this!

@01H-W-H10 01H-W-H10 added the bug Something isn't working label May 20, 2025
@greenrobot-team
Copy link
Member

greenrobot-team commented May 26, 2025

The Sourcery-based ObjectBox code generator needs to read from and write to the Xcode project directory. The only way we are aware of this works is to disable user script sandboxing in your Xcode project's build options (like when setting up the CocoaPods version).

Anyhow, a new preview release of the Swift Package that includes version 4.3.0 of the ObjectBox database is available.

Note: I labeled this issue with "more info required" so it will auto-close in a few days if there are no follow-up comments.

@greenrobot-team greenrobot-team self-assigned this May 26, 2025
@greenrobot-team greenrobot-team added question Further information is requested more info required Needs more info to become actionable. Auto-closed if no response. and removed bug Something isn't working labels May 26, 2025
@github-actions github-actions bot removed the more info required Needs more info to become actionable. Auto-closed if no response. label May 27, 2025
@greenrobot-team greenrobot-team added the more info required Needs more info to become actionable. Auto-closed if no response. label Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info required Needs more info to become actionable. Auto-closed if no response. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants