xcodebuild-axi 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,134 @@ Notable changes to `xcodebuild-axi`. Versions follow
4
4
  [semver](https://semver.org/); the format follows
5
5
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.13] - 2026-09-21
10
+
11
+ ### Added
12
+
13
+ - **`sim` seeds the fixtures a test needs and says where the app's files
14
+ went.** `location`, `media` and `container`.
15
+
16
+ `sim location "iPhone 17 Pro" 37.7749,-122.4194` puts the device somewhere;
17
+ two or more pairs move it between them (`--speed` sets how fast), a name
18
+ runs one of simctl's own scenarios, and no argument lists them — simctl
19
+ offers no way to read the current location back, so the list is the only
20
+ useful thing a bare call can say. A scenario name is matched
21
+ case-insensitively against that list, because simctl's own answer to a near
22
+ miss is "Could not find scenario".
23
+
24
+ `sim media "iPhone 17 Pro" receipt.png` adds photos, live photos, videos and
25
+ vCard contacts to the library. A file that is not there is refused before
26
+ simctl is called; a file it refuses comes back as
27
+ `receipt.heic — File type unsupported` rather than as the two-paragraph
28
+ "Multiple errors were returned; see stderr" simctl prints.
29
+
30
+ `sim container "iPhone 17 Pro"` answers where the app's files are with both
31
+ paths at once — the installed bundle and the data directory a test writes
32
+ into — because asking for one and then needing the other is two calls.
33
+ `groups` lists the App Group containers, and any `group.` identifier works
34
+ as well.
35
+
36
+ - **`build --install-src` copies a project's sources out.** The last
37
+ xcodebuild action left, which takes the headline number to **100% of the 161
38
+ leaves `xcodebuild -help` documents**.
39
+
40
+ It was declined for a while because it writes outside
41
+ `~/Library/Caches/xcodebuild-axi`, which nothing else here does. So it
42
+ doesn't: the copy lands in this project's cache directory, and `--src-root`
43
+ puts it somewhere else only with `--yes`, the way `migrate --format` works.
44
+ A destination that already exists is refused rather than emptied — deleting
45
+ a directory the caller named is not this tool's call.
46
+
47
+ Three things about `installsrc` that its own help does not say, all verified
48
+ against a real project: it **cannot run against a workspace** (it rejects
49
+ `-scheme`, and a workspace refuses to act without one — so the `.xcodeproj`
50
+ beside the workspace is used), it **refuses a destination that exists**, and
51
+ it **copies the whole project directory**, DerivedData included. A 271 MB
52
+ checkout came out as 258 MB across 5,104 files. The report says so, because
53
+ "installsrc" reads like a source export and is a packaging step.
54
+
55
+ ## [0.1.12] - 2026-09-21
56
+
57
+ ### Added
58
+
59
+ - **`sim` sets up the state a UI test needs.** `privacy`, `push`,
60
+ `status-bar` and `ui` — the last four simctl subcommands worth wrapping.
61
+
62
+ `sim privacy "iPhone 17 Pro" grant photos` answers a permission prompt
63
+ before it appears, which is the difference between a UI test that runs
64
+ unattended and one that waits for a tap. The bundle id is optional here too,
65
+ and `reset` is the one action that takes no app at all.
66
+
67
+ `sim push "iPhone 17 Pro" --message "Your order shipped"` writes the `aps`
68
+ dictionary simctl demands and sends it, rather than making the caller keep a
69
+ JSON file around for one line of text. A payload path still works, in either
70
+ order with the bundle id. simctl delivers a push addressed to an app that is
71
+ not installed and exits 0 — indistinguishable from a notification the app
72
+ ignored — so the app is checked first and the silence becomes a sentence.
73
+
74
+ `sim status-bar "iPhone 17 Pro" pin` freezes the clock at 9:41 with full
75
+ signal and a full battery, so two screenshots differ only where the app
76
+ does; `--time`, `--battery` and `--bars` override one piece at a time, and
77
+ `clear` hands the status bar back. Read back, simctl reports its overrides
78
+ as enum ordinals (`Battery State: 2`) and prints the words only inside its
79
+ own `--help`; every value was checked against what it accepts, so the
80
+ report reads in the same vocabulary the flags are written in.
81
+
82
+ `sim ui "iPhone 17 Pro"` reports appearance, contrast and content size
83
+ together, and `sim ui "iPhone 17 Pro" dark` is shorthand for setting the
84
+ one of the three anyone asks for.
85
+
86
+ That closes the coverage map: every leaf of xcodebuild, `xcresulttool`,
87
+ `xccov` and `simctl` is now either reached by a command or declined on the
88
+ record, with nothing left marked missing.
89
+
90
+ - **`sim` can run the app a build just produced.** Five simctl subcommands:
91
+ `sim apps`, `install`, `launch`, `terminate` and `uninstall`.
92
+
93
+ The app is optional in all four mutations. Without one, it is worked out
94
+ from the project in the current directory — `-showBuildSettings` against the
95
+ simulator's own destination answers both the `.app` path and the bundle id,
96
+ and answers them for the right platform, which a hand-typed DerivedData path
97
+ routinely does not. That resolution is most of the point: `build`, then
98
+ `sim install "iPhone 17 Pro"`, then `sim launch "iPhone 17 Pro"`, with
99
+ nothing pasted between the steps.
100
+
101
+ The mutations are idempotent where simctl's are not: terminating an app that
102
+ is not running and uninstalling one that is not installed are the state
103
+ being asked for, so both are a no-op at exit 0. `sim apps` filters out the
104
+ four dozen apps Apple ships — a typical device answers with 46 apps of which
105
+ two are the developer's — and `--system` puts them back.
106
+
107
+ `simctl listapps` prints an old-style NeXTSTEP plist rather than JSON, and
108
+ offers no `-j`; it goes through `plutil` to become readable.
109
+
110
+ - **`sim` makes devices, unmakes them, and shows what one looks like.**
111
+ `create`, `delete`, `screenshot`, `video` and `open`.
112
+
113
+ `sim create "Test iPhone" "iPhone 17 Pro"` takes the model by the name
114
+ `sim list` prints rather than by the
115
+ `com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro` identifier simctl
116
+ documents, and an unknown model comes back with the models that nearly
117
+ match. `--runtime` picks the OS.
118
+
119
+ `sim delete <name>` removes one and `--unavailable` removes every device
120
+ whose runtime is gone, which is the safe form of reclaiming disk. Deleting
121
+ _everything_ needs `--yes` on top of `--all`: a simulator is gigabytes of
122
+ state and recreating it is not the same device, so it gets the same guard
123
+ `migrate --format` has.
124
+
125
+ `sim screenshot` and `sim video` write to `~/Library/Caches` and report the
126
+ path and size. `simctl io recordVideo` records until it is sent SIGINT,
127
+ which is a contract for a person at a terminal — an agent cannot press
128
+ Control-C inside its own subprocess — so `--seconds` sets the length and the
129
+ interrupt is this tool's job. The clock starts when simctl says
130
+ `Recording started` rather than at spawn, so a slow start does not eat the
131
+ recording.
132
+
133
+ `sim open <url>` is how a deep link gets tested.
134
+
7
135
  ## [0.1.11] - 2026-09-21
8
136
 
9
137
  ### Added
@@ -443,7 +571,9 @@ First release.
443
571
  - 100% of the 117 options `xcodebuild -help` lists are covered, declared in
444
572
  `src/surface.ts` and checked against the installed Xcode in CI.
445
573
 
446
- [unreleased]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.11...HEAD
574
+ [unreleased]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.13...HEAD
575
+ [0.1.13]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.12...v0.1.13
576
+ [0.1.12]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.11...v0.1.12
447
577
  [0.1.11]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.10...v0.1.11
448
578
  [0.1.10]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.9...v0.1.10
449
579
  [0.1.9]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.8...v0.1.9
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <a href="https://www.npmjs.com/package/xcodebuild-axi"><img alt="npm" src="https://img.shields.io/npm/v/xcodebuild-axi?style=flat-square" /></a>
5
5
  <a href="https://axi.md/"><img alt="AXI" src="https://img.shields.io/badge/AXI-compliant-blue?style=flat-square" /></a>
6
6
  <img alt="Platform" src="https://img.shields.io/badge/platform-macOS-lightgrey?style=flat-square" />
7
- <!-- coverage-badge:start --><img alt="xcodebuild coverage" src="https://img.shields.io/badge/xcodebuild_coverage-99.4%25-brightgreen?style=flat-square" /><!-- coverage-badge:end -->
7
+ <!-- coverage-badge:start --><img alt="xcodebuild coverage" src="https://img.shields.io/badge/xcodebuild_coverage-100%25-brightgreen?style=flat-square" /><!-- coverage-badge:end -->
8
8
  <img alt="License" src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
9
9
  </p>
10
10
 
@@ -171,18 +171,18 @@ Every command takes `--help`.
171
171
 
172
172
  <!-- coverage:start -->
173
173
 
174
- **Coverage: 99.4% of the 161 leaves `xcodebuild` documents** — every option, build action, export options key, `-create-xcframework` argument, and the second forms that only a usage line mentions.
174
+ **Coverage: 100% of the 161 leaves `xcodebuild` documents** — every option, build action, export options key, `-create-xcframework` argument, and the second forms that only a usage line mentions.
175
175
 
176
176
  A leaf is one switch you could type. Counting options alone says 100% (117/117), which was true and hid every gap below: an option is one thing, and `-exportOptionsPlist` alone opens eighteen more.
177
177
 
178
- | Surface | Leaves | Covered |
179
- | ------------------------------------------------------ | ------- | --------------- |
180
- | `xcodebuild -help` options | 117 | 117 (100%) |
181
- | build actions | 10 | 9 (90%) |
182
- | second forms (`-version <infoitem>`, `-license check`) | 8 | 8 (100%) |
183
- | `-exportOptionsPlist` keys | 18 | 18 (100%) |
184
- | `-create-xcframework` options | 8 | 8 (100%) |
185
- | **total** | **161** | **160 (99.4%)** |
178
+ | Surface | Leaves | Covered |
179
+ | ------------------------------------------------------ | ------- | -------------- |
180
+ | `xcodebuild -help` options | 117 | 117 (100%) |
181
+ | build actions | 10 | 10 (100%) |
182
+ | second forms (`-version <infoitem>`, `-license check`) | 8 | 8 (100%) |
183
+ | `-exportOptionsPlist` keys | 18 | 18 (100%) |
184
+ | `-create-xcframework` options | 8 | 8 (100%) |
185
+ | **total** | **161** | **161 (100%)** |
186
186
 
187
187
  **Reach: 100%** of the 328 command-and-option pairs. The same options, counted once per command xcodebuild accepts them on — because `-target` exposed on `build` and missing from `settings` is not covered for anyone asking `settings`. 0 pairs are open.
188
188
 
@@ -200,37 +200,15 @@ A leaf is one switch you could type. Counting options alone says 100% (117/117),
200
200
  | `-help` | `xcodebuild-axi --help`, which answers it in a fraction of the tokens |
201
201
  | `-usage` | `xcodebuild-axi <command> --help`, per command rather than all 117 at once |
202
202
 
203
- The one action left out is `installsrc` — it copies sources into `SRCROOT` as root, which is a packaging step rather than anything an agent loop needs.
204
-
205
203
  ### Companion tools
206
204
 
207
- `xcresulttool`, `xccov` and `simctl` are not xcodebuild, so they are not in the number above — but this tool wraps all three, and an agent that has to shell out to one directly has dropped back down. **43.7% of 71 leaves**, counted the same way:
208
-
209
- | Tool | Leaves | Covered |
210
- | -------------- | ------ | --------- |
211
- | `xcresulttool` | 21 | 17 (81%) |
212
- | `xccov` | 9 | 9 (100%) |
213
- | `simctl` | 41 | 5 (12.2%) |
214
-
215
- ### Still open
216
-
217
- 13 leaves are known gaps rather than decisions — each one a reason someone would still reach for the raw tool:
218
-
219
- | Leaf | Unreachable from | What that costs |
220
- | ------------------- | ---------------- | ---------------------------------------------------------------- |
221
- | `simctl install` | `sim` | a built .app cannot be put on the simulator it was built for |
222
- | `simctl launch` | `sim` | the app a build just produced cannot be run |
223
- | `simctl terminate` | `?` | a running app cannot be stopped |
224
- | `simctl uninstall` | `?` | an installed app cannot be removed |
225
- | `simctl listapps` | `sim` | what is installed on a simulator cannot be listed |
226
- | `simctl create` | `?` | a missing device cannot be created |
227
- | `simctl delete` | `sim` | stale devices cannot be reclaimed, and they cost gigabytes |
228
- | `simctl io` | `sim` | a screenshot of a failing UI cannot be taken |
229
- | `simctl openurl` | `sim` | a deep link cannot be opened, which is how deep links are tested |
230
- | `simctl privacy` | `sim` | a permission prompt cannot be granted ahead of a UI test |
231
- | `simctl push` | `sim` | a push notification cannot be simulated |
232
- | `simctl status_bar` | `sim` | the status bar cannot be pinned, which screenshot tests need |
233
- | `simctl ui` | `sim` | dark mode and content size cannot be set for a test run |
205
+ `xcresulttool`, `xccov` and `simctl` are not xcodebuild, so they are not in the number above — but this tool wraps all three, and an agent that has to shell out to one directly has dropped back down. **66.2% of 71 leaves**, counted the same way:
206
+
207
+ | Tool | Leaves | Covered |
208
+ | -------------- | ------ | ---------- |
209
+ | `xcresulttool` | 21 | 17 (81%) |
210
+ | `xccov` | 9 | 9 (100%) |
211
+ | `simctl` | 41 | 21 (51.2%) |
234
212
 
235
213
  The denominator is read from `xcodebuild -help` rather than hand-maintained, and this table is written against **Xcode 27.0** — the option list moves between releases. `npm run coverage:check` fails on that Xcode if an option here is unclassified or has been dropped, and reports the difference without failing on any other.
236
214
 
@@ -1,3 +1,3 @@
1
- export declare const BUILD_HELP = "usage: xcodebuild-axi build [flags]\nBuilds a scheme and reports only what failed, with exact source locations.\nflags[46]:\n --scheme <name> scheme to act on (required only when the project has more than one)\n --target <name> build a target instead of a scheme; repeatable (project only)\n --all-targets build every target in the project (project only)\n --device <name> simulator or device name, e.g. \"iPhone 17 Pro\" (default: newest simulator)\n --destination <spec> raw xcodebuild destination specifier, passed through untouched\n --configuration <name> build configuration (default: the scheme's own)\n --sdk <name> base SDK, e.g. iphonesimulator\n --arch <arch> architecture to build; repeatable or comma-separated\n --toolchain <name> toolchain identifier or name\n --xcconfig <path> apply build settings from this file as overrides\n --derived-data <path> derived data directory\n --artifacts-dir <path> where to write this run's log and .xcresult (default: the tool's cache)\n --jobs <n> maximum concurrent build operations\n --setting KEY=VALUE build setting override; repeatable or comma-separated\n --sign allow code signing (off by default, so simulator builds need no team)\n --allow-provisioning let xcodebuild talk to the developer portal for profiles\n --sanitizer <name> address, thread, or undefined; repeatable or comma-separated\n --timing report per-command build timings\n --destination-timeout <secs> how long to wait for the destination device\n --parallelize-targets build independent targets in parallel\n --hide-script-env omit shell script environment variables from the log\n --skip-unavailable-actions skip scheme actions that cannot run instead of failing\n --max-errors <n> errors to list before summarizing the rest (default: 20)\n --full list every warning instead of the first 10\n --codesize <dir> write a code size profile to this directory\n --log-level <level> quiet, normal, or verbose \u2014 how much lands in the log file\n --bundle-version <n> result bundle format version (default: xcodebuild's own)\n --stream <path> also write xcodebuild's live result stream here\n --offline resolve using only the versions already in Package.resolved\n --cache <path> clone remote packages into this directory\n --package-cache <path> shared package cache directory (across projects)\n --no-auto-resolve never resolve automatically; fail if Package.resolved is stale\n --skip-package-updates use the packages already cloned, without checking for updates\n --no-package-cache ignore the shared package repository cache\n --skip-plugin-validation trust build plugins without prompting\n --skip-signature-validation do not verify package signatures\n --package-auth <kind> keychain or netrc\n --registry-url <url> default package registry\n --scm-to-registry <kind> none, identity, or swift-package-registry\n --fingerprint-policy <kind> strict or warn\n --signing-entity-policy <kind> strict or warn\n --scm-provider <kind> system or xcode\n --clean clean before building\n --for-testing build the tests too and emit an .xctestrun (build-for-testing)\n --install run the install action instead of build\n --docs build documentation (docbuild) instead of build\nexit:\n 0 build succeeded, 1 build failed, 2 usage error\nexamples:\n xcodebuild-axi build\n xcodebuild-axi build --scheme MyApp --device \"iPhone 17 Pro\"\n xcodebuild-axi build --scheme MyApp --configuration Release --clean\n xcodebuild-axi build --scheme MyApp --for-testing\n";
2
- export declare const BUILD_FLAGS: readonly ["--scheme", "--target", "--all-targets", "--device", "--destination", "--configuration", "--sdk", "--arch", "--toolchain", "--xcconfig", "--derived-data", "--artifacts-dir", "--jobs", "--setting", "--sign", "--allow-provisioning", "--sanitizer", "--timing", "--destination-timeout", "--parallelize-targets", "--hide-script-env", "--skip-unavailable-actions", "--max-errors", "--full", "--codesize", "--log-level", "--bundle-version", "--stream", "--offline", "--cache", "--package-cache", "--no-auto-resolve", "--skip-package-updates", "--no-package-cache", "--skip-plugin-validation", "--skip-signature-validation", "--package-auth", "--registry-url", "--scm-to-registry", "--fingerprint-policy", "--signing-entity-policy", "--scm-provider", "--clean", "--for-testing", "--install", "--docs"];
1
+ export declare const BUILD_HELP = "usage: xcodebuild-axi build [flags]\nBuilds a scheme and reports only what failed, with exact source locations.\nflags[49]:\n --scheme <name> scheme to act on (required only when the project has more than one)\n --target <name> build a target instead of a scheme; repeatable (project only)\n --all-targets build every target in the project (project only)\n --device <name> simulator or device name, e.g. \"iPhone 17 Pro\" (default: newest simulator)\n --destination <spec> raw xcodebuild destination specifier, passed through untouched\n --configuration <name> build configuration (default: the scheme's own)\n --sdk <name> base SDK, e.g. iphonesimulator\n --arch <arch> architecture to build; repeatable or comma-separated\n --toolchain <name> toolchain identifier or name\n --xcconfig <path> apply build settings from this file as overrides\n --derived-data <path> derived data directory\n --artifacts-dir <path> where to write this run's log and .xcresult (default: the tool's cache)\n --jobs <n> maximum concurrent build operations\n --setting KEY=VALUE build setting override; repeatable or comma-separated\n --sign allow code signing (off by default, so simulator builds need no team)\n --allow-provisioning let xcodebuild talk to the developer portal for profiles\n --sanitizer <name> address, thread, or undefined; repeatable or comma-separated\n --timing report per-command build timings\n --destination-timeout <secs> how long to wait for the destination device\n --parallelize-targets build independent targets in parallel\n --hide-script-env omit shell script environment variables from the log\n --skip-unavailable-actions skip scheme actions that cannot run instead of failing\n --max-errors <n> errors to list before summarizing the rest (default: 20)\n --full list every warning instead of the first 10\n --codesize <dir> write a code size profile to this directory\n --log-level <level> quiet, normal, or verbose \u2014 how much lands in the log file\n --bundle-version <n> result bundle format version (default: xcodebuild's own)\n --stream <path> also write xcodebuild's live result stream here\n --offline resolve using only the versions already in Package.resolved\n --cache <path> clone remote packages into this directory\n --package-cache <path> shared package cache directory (across projects)\n --no-auto-resolve never resolve automatically; fail if Package.resolved is stale\n --skip-package-updates use the packages already cloned, without checking for updates\n --no-package-cache ignore the shared package repository cache\n --skip-plugin-validation trust build plugins without prompting\n --skip-signature-validation do not verify package signatures\n --package-auth <kind> keychain or netrc\n --registry-url <url> default package registry\n --scm-to-registry <kind> none, identity, or swift-package-registry\n --fingerprint-policy <kind> strict or warn\n --signing-entity-policy <kind> strict or warn\n --scm-provider <kind> system or xcode\n --clean clean before building\n --for-testing build the tests too and emit an .xctestrun (build-for-testing)\n --install run the install action instead of build\n --docs build documentation (docbuild) instead of build\n --install-src copy the project's sources out instead of building (installsrc)\n --src-root <path> with --install-src: where to copy them; needs --yes\n --yes required to copy sources anywhere but the cache\nexit:\n 0 build succeeded, 1 build failed, 2 usage error\nexamples:\n xcodebuild-axi build\n xcodebuild-axi build --scheme MyApp --device \"iPhone 17 Pro\"\n xcodebuild-axi build --scheme MyApp --configuration Release --clean\n xcodebuild-axi build --scheme MyApp --for-testing\n xcodebuild-axi build --install-src\n";
2
+ export declare const BUILD_FLAGS: readonly ["--scheme", "--target", "--all-targets", "--device", "--destination", "--configuration", "--sdk", "--arch", "--toolchain", "--xcconfig", "--derived-data", "--artifacts-dir", "--jobs", "--setting", "--sign", "--allow-provisioning", "--sanitizer", "--timing", "--destination-timeout", "--parallelize-targets", "--hide-script-env", "--skip-unavailable-actions", "--max-errors", "--full", "--codesize", "--log-level", "--bundle-version", "--stream", "--offline", "--cache", "--package-cache", "--no-auto-resolve", "--skip-package-updates", "--no-package-cache", "--skip-plugin-validation", "--skip-signature-validation", "--package-auth", "--registry-url", "--scm-to-registry", "--fingerprint-policy", "--signing-entity-policy", "--scm-provider", "--clean", "--for-testing", "--install", "--docs", "--install-src", "--src-root", "--yes"];
3
3
  export declare function buildCommand(args: string[]): Promise<string>;
@@ -1,14 +1,22 @@
1
1
  import { BUILD_FLAG_HELP, reportAction, resolveBuildContext, runAction, SHARED_BUILD_FLAGS, SHARED_BUILD_VALUE_FLAGS, } from "../action.js";
2
- import { AxiError } from "../errors.js";
3
- import { hasFlag, rejectUnknownFlags } from "../args.js";
2
+ import { AxiError, mapXcodebuildError } from "../errors.js";
3
+ import { getFlag, hasFlag, rejectUnknownFlags } from "../args.js";
4
+ import { existsSync, readdirSync, rmSync, statSync } from "node:fs";
5
+ import { basename, join, resolve as resolvePath } from "node:path";
6
+ import { requireProject } from "../context.js";
7
+ import { artifactDir, runBuild } from "../xcodebuild.js";
8
+ import { byteSize, duration, renderFields, renderHelp, renderOutput, tildePath, } from "../toon.js";
4
9
  export const BUILD_HELP = `usage: xcodebuild-axi build [flags]
5
10
  Builds a scheme and reports only what failed, with exact source locations.
6
- flags[46]:
11
+ flags[49]:
7
12
  ${BUILD_FLAG_HELP}
8
13
  --clean clean before building
9
14
  --for-testing build the tests too and emit an .xctestrun (build-for-testing)
10
15
  --install run the install action instead of build
11
16
  --docs build documentation (docbuild) instead of build
17
+ --install-src copy the project's sources out instead of building (installsrc)
18
+ --src-root <path> with --install-src: where to copy them; needs --yes
19
+ --yes required to copy sources anywhere but the cache
12
20
  exit:
13
21
  0 build succeeded, 1 build failed, 2 usage error
14
22
  examples:
@@ -16,6 +24,7 @@ examples:
16
24
  xcodebuild-axi build --scheme MyApp --device "iPhone 17 Pro"
17
25
  xcodebuild-axi build --scheme MyApp --configuration Release --clean
18
26
  xcodebuild-axi build --scheme MyApp --for-testing
27
+ xcodebuild-axi build --install-src
19
28
  `;
20
29
  export const BUILD_FLAGS = [
21
30
  ...SHARED_BUILD_FLAGS,
@@ -23,9 +32,15 @@ export const BUILD_FLAGS = [
23
32
  "--for-testing",
24
33
  "--install",
25
34
  "--docs",
35
+ "--install-src",
36
+ "--src-root",
37
+ "--yes",
26
38
  ];
39
+ const BUILD_VALUE_FLAGS = [...SHARED_BUILD_VALUE_FLAGS, "--src-root"];
27
40
  export async function buildCommand(args) {
28
- rejectUnknownFlags(args, "build", BUILD_FLAGS, SHARED_BUILD_VALUE_FLAGS);
41
+ rejectUnknownFlags(args, "build", BUILD_FLAGS, BUILD_VALUE_FLAGS);
42
+ if (hasFlag(args, "--install-src"))
43
+ return installSources(args);
29
44
  const action = pickAction(args);
30
45
  const context = await resolveBuildContext({ args, command: "build" });
31
46
  const run = await runAction({
@@ -57,4 +72,128 @@ function pickAction(args) {
57
72
  }
58
73
  return chosen[0] ?? "build";
59
74
  }
75
+ /**
76
+ * `installsrc`, xcodebuild's own source-copy action.
77
+ *
78
+ * Three things about it are worth knowing before reading this, all verified
79
+ * against a real project:
80
+ *
81
+ * - **It cannot run against a workspace.** `-scheme` is rejected outright
82
+ * ("Cannot use the installsrc action with -scheme") and a workspace refuses
83
+ * to do anything without one, so the only form that works is `-project`.
84
+ * - **It refuses a destination that already exists**, with "Cannot determine
85
+ * install sources to path", the same shape as its refusal to overwrite a
86
+ * result bundle.
87
+ * - **It copies the whole project directory**, build products included — a
88
+ * 271 MB checkout came out as 270 MB, of which most was DerivedData. It is
89
+ * a packaging step rather than a source export, and the report says so.
90
+ *
91
+ * The default destination is this project's cache directory, because
92
+ * everything else here writes only there. A caller who wants it somewhere
93
+ * else says where and confirms, the way `migrate --format` does.
94
+ */
95
+ async function installSources(args) {
96
+ const conflict = ["--for-testing", "--install", "--docs", "--clean"].find((flag) => hasFlag(args, flag));
97
+ if (conflict !== undefined) {
98
+ throw new AxiError(`Copying sources is not a build and cannot be combined with ${conflict}`, "VALIDATION_ERROR", ["Run the two as separate commands"]);
99
+ }
100
+ const project = requireProject();
101
+ const container = installSrcContainer(project);
102
+ const destination = sourceDestination(args, project);
103
+ const run = await runBuild({
104
+ args: ["-project", container, "installsrc", `SRCROOT=${destination}`],
105
+ label: `${project.name}-installsrc`,
106
+ project,
107
+ });
108
+ if (run.exitCode !== 0) {
109
+ const mapped = mapXcodebuildError(run.tail);
110
+ throw new AxiError(mapped?.message ?? `Could not copy the sources of ${project.name}`, mapped?.code ?? "UNKNOWN", [
111
+ ...(mapped?.suggestions ?? []),
112
+ `full transcript: ${tildePath(run.logPath)}`,
113
+ ]);
114
+ }
115
+ const { files, bytes } = measure(destination);
116
+ return renderOutput([
117
+ renderFields({
118
+ installsrc: "copied",
119
+ project: project.name,
120
+ files,
121
+ size: byteSize(bytes),
122
+ to: tildePath(destination),
123
+ duration: duration(run.seconds),
124
+ }),
125
+ renderHelp([
126
+ "installsrc copies the whole project directory, build products included — it is xcodebuild's packaging step rather than a source export",
127
+ ]),
128
+ ]);
129
+ }
130
+ /** The `.xcodeproj` installsrc needs, which is not always what we build with. */
131
+ function installSrcContainer(project) {
132
+ if (project.kind === "project")
133
+ return project.path;
134
+ if (project.kind === "package") {
135
+ throw new AxiError("installsrc needs an Xcode project and a Swift package has none", "VALIDATION_ERROR", [
136
+ "`git archive HEAD` copies a package's sources and leaves the build products behind",
137
+ ]);
138
+ }
139
+ // A workspace is a dead end for this action, not a harder case: it demands
140
+ // a scheme and installsrc rejects one. The .xcodeproj beside it is the
141
+ // thing xcodebuild would have picked with no workspace present.
142
+ const dir = resolvePath(project.path, "..");
143
+ const sibling = readdirSync(dir).filter((entry) => entry.endsWith(".xcodeproj"));
144
+ const only = sibling[0];
145
+ if (sibling.length !== 1 || only === undefined) {
146
+ throw new AxiError(`installsrc cannot run against ${basename(project.path)}`, "VALIDATION_ERROR", [
147
+ "xcodebuild rejects `-scheme` with installsrc, and a workspace will not act without one",
148
+ sibling.length === 0
149
+ ? "cd to a directory holding a single .xcodeproj, then re-run"
150
+ : `${sibling.length} projects sit beside it: ${sibling.join(", ")}`,
151
+ ]);
152
+ }
153
+ return join(dir, only);
154
+ }
155
+ /** Where the copy lands: this project's cache, or a path the caller stands behind. */
156
+ function sourceDestination(args, project) {
157
+ const requested = getFlag(args, "--src-root");
158
+ if (requested === undefined) {
159
+ const cached = join(artifactDir(project), "src");
160
+ // Ours to clear, the way the result bundle is: installsrc will not write
161
+ // into a directory that already exists.
162
+ rmSync(cached, { recursive: true, force: true });
163
+ return cached;
164
+ }
165
+ if (!hasFlag(args, "--yes")) {
166
+ throw new AxiError(`Copying ${project.name} outside the tool's cache needs --yes as well as --src-root`, "VALIDATION_ERROR", [
167
+ `xcodebuild-axi build --install-src --src-root ${requested} --yes`,
168
+ "Without --src-root the copy lands in ~/Library/Caches/xcodebuild-axi",
169
+ ]);
170
+ }
171
+ const path = resolvePath(requested);
172
+ if (existsSync(path)) {
173
+ throw new AxiError(`Something is already at ${tildePath(path)}`, "VALIDATION_ERROR", [
174
+ "installsrc refuses a destination that exists, and deleting one you named is not this tool's call",
175
+ "Pass an empty path, or remove it yourself first",
176
+ ]);
177
+ }
178
+ return path;
179
+ }
180
+ /** What actually landed, since installsrc reports only that it started. */
181
+ function measure(dir) {
182
+ let files = 0;
183
+ let bytes = 0;
184
+ const walk = (path) => {
185
+ for (const entry of readdirSync(path, { withFileTypes: true })) {
186
+ const child = join(path, entry.name);
187
+ if (entry.isDirectory()) {
188
+ walk(child);
189
+ }
190
+ else if (entry.isFile()) {
191
+ files += 1;
192
+ bytes += statSync(child).size;
193
+ }
194
+ }
195
+ };
196
+ walk(dir);
197
+ return { files, bytes };
198
+ }
60
199
  //# sourceMappingURL=build.js.map
@@ -1 +1 @@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EAAE,KAAK,EAAE,CAAC;AAC1B,CAAC"}
@@ -14,3 +14,9 @@ export declare function xcodebuildComplaint(stderr: string): string[];
14
14
  export declare function platformOf(settings: Record<string, unknown>): {
15
15
  platform: string;
16
16
  } | Record<string, never>;
17
+ /**
18
+ * `-showBuildSettings -json` emits an array of one object per target, each
19
+ * with a `buildSettings` map. Later targets win on collision, which matches
20
+ * the order xcodebuild itself resolves them in.
21
+ */
22
+ export declare function parseSettings(stdout: string): Record<string, string>;
@@ -339,7 +339,7 @@ function relativeToCwd(path) {
339
339
  * with a `buildSettings` map. Later targets win on collision, which matches
340
340
  * the order xcodebuild itself resolves them in.
341
341
  */
342
- function parseSettings(stdout) {
342
+ export function parseSettings(stdout) {
343
343
  const start = stdout.indexOf("[");
344
344
  if (start === -1)
345
345
  return {};
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/commands/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,OAAO,EACP,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C5B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU;IACV,UAAU;IACV,eAAe;IACf,OAAO;IACP,iBAAiB;IACjB,UAAU;IACV,eAA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"}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/commands/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,OAAO,EACP,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C5B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU;IACV,UAAU;IACV,eAAe;IACf,OAAO;IACP,iBAAiB;IACjB,UAAU;IACV,eAAe;IACf,uBAAuB;IACvB,OAAO;IACP,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACX,OAAO;IACP,aAAa;IACb,QAAQ;IACR,QAAQ;CACA,CAAC;AACX,MAAM,WAAW,GAAG;IAClB,UAAU;IACV,UAAU;IACV,OAAO;IACP,iBAAiB;IACjB,UAAU;IACV,eAAe;IACf,uBAAuB;IACvB,OAAO;IACP,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACX,QAAQ;CACA,CAAC;AAEX,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAc;IAClD,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IAElE,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,E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C,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5B,IAAI,MAAoD,CAAC;IACzD,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAEpC,CAAC;IACN,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,3 +1,33 @@
1
- export declare const SIM_HELP = "usage: xcodebuild-axi sim [list|boot|shutdown|erase] [name|udid] [flags]\nInspects and drives simulators. With no subcommand, lists the booted ones.\nsubcommands[4]:\n list every available simulator\n boot <name|udid> boot one, or no-op if it is already booted\n shutdown <name|udid> shut one down, or no-op if it already is; --all for every booted one\n erase <name|udid> erase one back to factory state; --all for every shut-down one\nflags[3]:\n --runtime <name> filter the list, e.g. \"iOS 26.5\"\n --booted list only booted simulators\n --all apply shutdown or erase to every eligible simulator\nexamples:\n xcodebuild-axi sim\n xcodebuild-axi sim list --runtime \"iOS 26.5\"\n xcodebuild-axi sim boot \"iPhone 17 Pro\"\n xcodebuild-axi sim shutdown --all\n";
2
- export declare const SIM_FLAGS: readonly ["--runtime", "--booted", "--all"];
1
+ import { type InstalledApp } from "../simctl.js";
2
+ export declare const SIM_HELP = "usage: xcodebuild-axi sim [subcommand] [name|udid] [app] [flags]\nInspects and drives simulators. With no subcommand, lists the booted ones.\nsubcommands[21]:\n list every available simulator\n boot <name|udid> boot one, or no-op if it is already booted\n shutdown <name|udid> shut one down, or no-op if it already is; --all for every booted one\n erase <name|udid> erase one back to factory state; --all for every shut-down one\n apps <name|udid> the apps installed on it; --system to include Apple's\n install <name|udid> [path.app] install an app; without a path, the one\n this project builds for that simulator\n launch <name|udid> [bundle-id] launch it; without an id, this project's\n terminate <name|udid> [bundle-id] stop it, or no-op if it is not running\n uninstall <name|udid> [bundle-id] remove it\n create <name> <model> create a device; --runtime picks the OS\n delete <name|udid> delete one; --unavailable for every orphaned device\n screenshot <name|udid> [path] save a PNG of its screen\n video <name|udid> [path] record its screen; --seconds sets how long\n open <name|udid> <url> open a URL on it, deep links included\n privacy <name|udid> <grant|revoke|reset> <service> [bundle-id]\n answer a permission prompt before it appears\n push <name|udid> [bundle-id] [payload.json]\n send a push; --message writes the payload for you\n status-bar <name|udid> [pin|clear] freeze the status bar for a screenshot\n ui <name|udid> [light|dark|<setting> <value>] read or set appearance,\n contrast and content size\n location <name|udid> [lat,lon|scenario|clear] put the device somewhere;\n two or more pairs move it between them\n media <name|udid> <path> [...] add photos, videos or contacts to it\n container <name|udid> [bundle-id] [app|data|groups]\n where an app's files are on this machine\nflags[15]:\n --runtime <name> filter the list, e.g. \"iOS 26.5\"\n --booted list only booted simulators\n --all apply shutdown or erase to every eligible simulator\n --system include Apple's own apps in `apps`\n --scheme <name> which scheme's app to install or launch\n --relaunch with launch: stop a running copy first\n --unavailable with delete: every device whose runtime is gone\n --seconds <n> with video: how long to record (default: 10)\n --yes required to delete every simulator at once\n --message <text> with push: the alert body to send\n --title <text> with push: the alert title\n --time <string> with status-bar: the clock, e.g. \"9:41\"\n --battery <0-100> with status-bar: the battery level\n --bars <0-4> with status-bar: wifi and cellular signal strength\n --speed <m/s> with location: how fast to move between waypoints\nnote:\n install, launch, terminate and uninstall take the app as a path or a bundle\n id, and work it out from the project in the current directory when it is\n left off \u2014 the point of them is the loop from a build to a running app, and\n a DerivedData path is not something worth typing.\nexamples:\n xcodebuild-axi sim\n xcodebuild-axi sim list --runtime \"iOS 26.5\"\n xcodebuild-axi sim boot \"iPhone 17 Pro\"\n xcodebuild-axi sim install \"iPhone 17 Pro\"\n xcodebuild-axi sim launch \"iPhone 17 Pro\" --relaunch\n xcodebuild-axi sim apps \"iPhone 17 Pro\"\n xcodebuild-axi sim screenshot \"iPhone 17 Pro\"\n xcodebuild-axi sim create \"Test iPhone\" \"iPhone 17 Pro\" --runtime \"iOS 26.5\"\n xcodebuild-axi sim open \"iPhone 17 Pro\" myapp://checkout\n xcodebuild-axi sim privacy \"iPhone 17 Pro\" grant photos\n xcodebuild-axi sim status-bar \"iPhone 17 Pro\" pin\n xcodebuild-axi sim ui \"iPhone 17 Pro\" dark\n xcodebuild-axi sim location \"iPhone 17 Pro\" 37.7749,-122.4194\n xcodebuild-axi sim media \"iPhone 17 Pro\" fixtures/receipt.png\n xcodebuild-axi sim container \"iPhone 17 Pro\" data\n";
3
+ export declare const SIM_FLAGS: readonly ["--runtime", "--booted", "--all", "--system", "--scheme", "--relaunch", "--unavailable", "--seconds", "--yes", "--message", "--title", "--time", "--battery", "--bars", "--speed"];
3
4
  export declare function simCommand(args: string[]): Promise<string>;
5
+ export declare function appRow(app: InstalledApp): Record<string, unknown>;
6
+ /**
7
+ * simctl prints its scenarios as a two-column table with the name repeated as
8
+ * the description, under a header and a row of equals signs.
9
+ */
10
+ export declare function scenarioNames(stdout: string): string[];
11
+ /**
12
+ * simctl reports a rejected file as
13
+ * `Failed to import '<path>', error [<domain>] 22: ... File type unsupported.`
14
+ * and then says "see stderr", which is where the reader already is. The
15
+ * useful half is the filename and the last sentence.
16
+ */
17
+ export declare function importComplaints(stderr: string): string[];
18
+ /** A payload is the argument with a path in it; a bundle id is the other one. */
19
+ export declare function isPayloadPath(value: string): boolean;
20
+ /**
21
+ * `sim ui <device> dark` rather than `sim ui <device> appearance dark`: the
22
+ * setting is unambiguous from the value, and the short form is the one anyone
23
+ * types. Everything else names the setting first, the way simctl does.
24
+ */
25
+ export declare function uiSetting(setting: string, value: string | undefined): [string, string | undefined];
26
+ /**
27
+ * simctl reports its overrides as prose — one line per group, several
28
+ * `Key: Value` pairs to a line. Flattening them into fields is what makes the
29
+ * answer readable next to the flags that set them.
30
+ */
31
+ export declare function statusRows(stdout: string): Record<string, string | number>;
32
+ /** The individual overrides, for the cases `pin` does not cover. */
33
+ export declare function statusOverrides(args: string[]): string[];