Skip to main content
When to use it.
  • Your project has its own build or release script (an archive, fastlane, a code generator)
  • You need a file only the Mac can make, such as an IPA or an .xcarchive
  • You want to see what is on the Mac: xcodebuild -version, xcrun simctl list

Run a command and get a file back

BoxDemo keeps an archive script in scripts/archive.sh that makes an unsigned build/BoxDemo.ipa. Copying it into $BOX_OUT brings it back

box exec running xcodebuild -showsdks on the Mac

Job bj_STF4GX2ZsG8dmBWM on the production Mac: 60 s billed, $0.05

Good to know

  • The command runs in a copy of your project on the Mac. A file written anywhere else does not come back; write it to $BOX_OUT. A box-out/ folder inside the project comes back too
  • The command’s whole output is saved as exec.log
  • The command’s own exit code decides the job: anything but 0 is a failed job and box exits with 1
  • box keeps no signing files and has no secrets option; the command sees only your project folder. .env is never uploaded
  • Add --platform android to run it on the Android machine instead