SPB Git

Repository Public License

setup.md 6.8 KB 151 lines markdown

1<!--2ORIX Scan3File: docs/development/setup.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->78# Development setup910## Requirements1112| Tool | Version used | Notes |13|---|---|---|14| Xcode | 27.2 | iOS SDK 27.2 |15| Swift | 6.4 toolchain, Swift 6 language mode | Strict concurrency is `complete`; the app target uses `SWIFT_DEFAULT_ACTOR_ISOLATION: MainActor` |16| XcodeGen | any recent release | `brew install xcodegen`; the `.xcodeproj` is generated and not committed |17| Deployment target | iOS / iPadOS 18.0 | The package also declares macOS 15 so the engines can be tested on the host |18| Python 3 | with Pillow for `Scripts/shots.py` on iPad runs | Used by the helper scripts only |1920There are no third-party dependencies to resolve.2122## Getting started2324```bash25git clone https://git.spboucher.ai/orix-scan.git ORIXScan26cd ORIXScan27Scripts/build.sh generate      # writes ORIXScan.xcodeproj from project.yml28Scripts/build.sh kit           # engine and design-system tests on the Mac29Scripts/build.sh debug         # Debug build for the simulator30```3132Open `ORIXScan.xcodeproj` in Xcode to run the app. The scanner needs a camera, so it is unavailable in the Simulator; the33app says so and everything else works through imports or the demo documents (below).3435## `Scripts/build.sh`3637| Command | What it does |38|---|---|39| `generate` | Runs `xcodegen generate` |40| `kit` | `swift test --no-parallel` in `Packages/ORIXKit` (host Mac) |41| `debug` | Debug build for the simulator named by `ORIX_SIM` |42| `release` | Release build for the generic iOS Simulator destination |43| `uitest [xcodebuild args]` | Boots the simulator, runs `ORIXScanUITests`, writes the result bundle to `build/results/` and exports its attachments to `build/shots/<simulator>/` |44| `all` | `generate`, `kit`, `debug`, `uitest` |4546Output is filtered to errors and test summaries; full logs are in `build/logs/`. `ORIX_SIM` selects the simulator47(default `ORIX iPhone`).4849## Simulators5051The scripts use two dedicated simulators so that test runs do not collide with other projects on the same Mac:5253```bash54xcrun simctl create "ORIX iPhone" "iPhone 17 Pro"55xcrun simctl create "ORIX iPad" "iPad Pro 13-inch (M5)"5657ORIX_SIM="ORIX iPad" Scripts/build.sh uitest58```5960After a UI test run, `Scripts/shots.py <simulator_dir>` (for example `ORIX_iPhone`) copies the named screenshots to61`build/shots/<simulator_dir>/named/`.6263## Debug launch arguments6465Compiled only in Debug builds (`App/Sources/Debug/DemoContent.swift`):6667| Argument | Effect |68|---|---|69| `-ORIXUITest YES` | Uses a separate store under the temporary directory instead of the user's library |70| `-ORIXReset YES` | Empties that store and resets the related preferences first |71| `-ORIXDemo YES` | When the library is empty, draws sample documents on the device and runs them through the real engines |7273```bash74xcrun simctl launch "ORIX iPhone" ai.spboucher.orix.scan -ORIXUITest YES -ORIXReset YES -ORIXDemo YES75```7677Release builds contain none of this.7879## Localization8081The app is written in English and localized to French (Canada) with string catalogs82(`App/Resources/Localizable.xcstrings`, `App/Resources/InfoPlist.xcstrings`). After changing user-facing strings:8384```bash85Scripts/build.sh debug && Scripts/localize.py86```8788`Scripts/localize.py` re-extracts the keys from the build's `.stringsdata` files with `xcstringstool sync`, merges89`Scripts/translations-fr.json`, writes plural variants, and exits with an error if a key has no French translation.90`--no-sync` merges the translations without re-extracting.9192## Hygiene9394```bash95Scripts/check.sh96```9798Checks that every first-party source file starts with the author header, and scans tracked and untracked (non-ignored)99files for signing material, credentials and private addresses. It exits non-zero on any finding. `.gitignore` excludes100build products, the generated project, and every kind of key, certificate, profile and `.env` file.101102## Benchmarks103104`Scripts/benchmark.sh` runs the OCR accuracy benchmark and the engine timings on the host Mac and writes JSON to105`docs/development/benchmarks/`. These measure the engine code the app ships, on the Mac, not on an iPhone or iPad.106107## Release scripts108109`Scripts/release.sh archive | export | validate | upload` builds the Release archive, exports the IPA for App Store110Connect, validates it and uploads it. The API key identifiers are read from the environment or from111`~/.config/orix-scan/asc.env`; nothing secret is in the repository, and `upload` refuses to run unless112`ORIX_UPLOAD_AUTHORIZED=yes` is set. The App Store Connect metadata is in113[`docs/release/app-store.md`](../release/app-store.md).114115## Project layout116117```text118ORIXScan/119├── project.yml                      XcodeGen definition (app + UI tests)120├── App/121│   ├── Resources/                   Info.plist, PrivacyInfo.xcprivacy, string catalogs, Assets.xcassets122│   └── Sources/123│       ├── Core/                    ORIXScanApp, AppModel, Router, RootView, AppSettings, Naming, SharedViews124│       ├── Home/                    HomeView125│       ├── Library/                 LibraryView126│       ├── Document/                DocumentView, PageEditorView, PageOrganizerView, DocumentTextView, ExportSheet127│       ├── Capture/                 ScannerView128│       ├── Actions/                 ActionsView, WorkflowEditorView, WorkflowRunView129│       ├── Settings/                SettingsView130│       ├── Platform/                Intents, Support131│       └── Debug/                   DemoContent (Debug only)132├── Packages/ORIXKit/133│   ├── Package.swift134│   ├── Sources/135│   │   ├── ORIXDesign/              Tokens, Components, Haptics136│   │   └── ORIXKit/137│   │       ├── Model/               Document, Geometry138│   │       ├── Imaging/             PageRenderer, DocumentDetector, QualityAnalyzer139│   │       ├── OCR/                 OCREngine, OCRModel, ReadingOrder, TableExtractor, TextMetrics140│   │       ├── PDF/                 SearchablePDFBuilder, PDFTools141│   │       ├── Storage/             DocumentStore, DocumentProcessor, Library142│   │       └── Actions/             Workflow, WorkflowEngine143│   └── Tests/ORIXKitTests/          EngineTests, PipelineTests, LibraryTests, BenchmarkTests, Support144├── UITests/                         ORIXScanUITests145├── Scripts/                         build.sh, release.sh, benchmark.sh, check.sh, localize.py, shots.py, translations-fr.json, ExportOptions.plist146├── design/icon/                     concepts, master artwork, build.py, contact.py147└── docs/                            architecture, design, development, release, assets148```149150Architecture: [`docs/architecture/overview.md`](../architecture/overview.md).151
Files main
Menu

Theme