SPB Git

Repository Public License

setup.md 4.4 KB

# Development Setup

# Requirements

Tool Version used Notes
macOS 27.0 Apple silicon
Xcode 27.2 (27B52) iOS 27.2 SDK, Swift 6.4 toolchain
iOS Simulator runtime 26.5 the only runtime installed on the development Mac
XcodeGen Homebrew brew install xcodegen
Deployment target iOS 18.0 package also builds for macOS 15 (tests)

No third-party package, no CocoaPods, no Carthage. The Xcode project is generated and not committed.

# First build

bash
Scripts/build.sh generate            # ORIXCamera.xcodeproj from project.yml
xcrun simctl create "ORIXCamera iPhone" com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-5
xcrun simctl create "ORIXCamera iPad" com.apple.CoreSimulator.SimDeviceType.iPad-Pro-13-inch-M5-12GB com.apple.CoreSimulator.SimRuntime.iOS-26-5
Scripts/build.sh kit                 # engine tests on the Mac
Scripts/build.sh debug               # Debug build for "ORIXCamera iPhone"
Scripts/sim.sh build/shots/first.png 6 -ORIXUITest YES -ORIXReset YES

The scripts use their own DerivedData in build/DerivedData, keep full logs in build/logs/, and print only errors and results. ORIX_SIM selects another simulator.

In the Simulator the app runs on its virtual camera: you see the procedural test scene with a "SIMULATOR · TEST SCENE" badge.

# Running on a device

Nobody has done this yet. To do it:

  1. Set your team in project.yml (DEVELOPMENT_TEAM), run Scripts/build.sh generate.
  2. Open the project, select the device, run. Automatic signing registers the bundle identifier ai.spboucher.orix.camera.
  3. Follow the device test plan in testing.md and record the results.

A device build without signing can be checked from the command line:

bash
xcodebuild -project ORIXCamera.xcodeproj -scheme ORIXCamera -configuration Debug \
  -destination "generic/platform=iOS" -derivedDataPath build/DerivedData-device CODE_SIGNING_ALLOWED=NO build

This is the only way DeviceCameraBackend is compiled: it is excluded from Simulator builds.

# Project settings worth knowing

Setting Value Why
SWIFT_VERSION 6.0, strict concurrency complete data-race safety checked by the compiler
SWIFT_DEFAULT_ACTOR_ISOLATION MainActor (app target) UI code is main-actor by default; off-main types are marked nonisolated
GENERATE_INFOPLIST_FILE NO App/Resources/Info.plist is explicit
Orientations iPhone portrait; iPad all UIRequiresFullScreen is set: the camera needs the full screen
ITSAppUsesNonExemptEncryption false no encryption beyond the system's

# Launch arguments (Debug only)

Defined in App/Sources/App/DebugHooks.swift and App/Sources/Features/Library/LibraryModel.swift. A Release build ignores all of them.

Argument Effect
-ORIXUITest YES isolated library in the temporary directory, welcome skipped, animations and haptics off, sheets open at full height
-ORIXReset YES wipe that library and the settings first
-ORIXWelcome YES show the first-launch screen
-ORIXMode auto|photo|video|creative|analysis start in a mode
-ORIXCreative <tool> select a creative tool
-ORIXTools peaking,zebra,shadows,falseColor,clipping,rgb,bigHistogram,golden,safe,look,wide turn monitoring aids on
-ORIXDemo YES seed an empty library with six captures rendered from the synthetic scene and one album
-ORIXOpen library|editor|settings open a screen at launch
-ORIXLibraryShow viewer|metadata|export|albums|duplicates, -ORIXEditorTab <tab> open a library sub-screen or an editor tab
-ORIXDenied YES Simulator: behave as if camera access were refused

When calling Scripts/sim.sh from zsh, pass arguments as separate words or as an array; an unquoted variable holding several arguments is passed as one.

# Repository hygiene

Scripts/check.sh fails if a first-party Swift, shell or Python file lacks the author header, or if a tracked or untracked file looks like signing material or contains something shaped like a credential or a private network address. Run it before every commit.

# Icon

design/icon/build.py regenerates the masters, the asset catalog icons and the documentation images. See ../design/icon-design.md.

Files main
Menu

Theme