@swmansion/argent 0.22.2-next.9 → 0.23.1-next.0

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.
Files changed (34) hide show
  1. package/README.md +1 -1
  2. package/bin/darwin/simulator-server +0 -0
  3. package/bin/linux/simulator-server +0 -0
  4. package/bin/linux-arm64/simulator-server +0 -0
  5. package/bin/win32/simulator-server.exe +0 -0
  6. package/dist/cli-cmds.mjs +25 -2
  7. package/dist/installer.mjs +210 -8
  8. package/dist/ios-device-runner/ArgentRunner/ArgentRunner/RunnerHostApp.swift +37 -0
  9. package/dist/ios-device-runner/ArgentRunner/ArgentRunner.xcodeproj/project.pbxproj +389 -0
  10. package/dist/ios-device-runner/ArgentRunner/ArgentRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  11. package/dist/ios-device-runner/ArgentRunner/ArgentRunner.xcodeproj/xcshareddata/xcschemes/ArgentRunner.xcscheme +88 -0
  12. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentExceptionGuard.h +16 -0
  13. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentExceptionGuard.m +16 -0
  14. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Commands.swift +280 -0
  15. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Gestures.swift +149 -0
  16. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Screenshot.swift +21 -0
  17. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Snapshot.swift +327 -0
  18. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+TextEntry.swift +157 -0
  19. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession.swift +410 -0
  20. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerUITests-Bridging-Header.h +1 -0
  21. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/CommandJournal.swift +134 -0
  22. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/MainThreadGate.swift +111 -0
  23. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/RunnerHTTPServer.swift +267 -0
  24. package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/RunnerProtocol.swift +331 -0
  25. package/dist/mcp-server.mjs +24 -1
  26. package/dist/tool-server.cjs +4232 -1388
  27. package/package.json +1 -1
  28. package/rules/argent.md +8 -3
  29. package/skills/argent-create-flow/SKILL.md +1 -0
  30. package/skills/argent-device-interact/SKILL.md +2 -0
  31. package/skills/argent-ios-device-interact/SKILL.md +18 -0
  32. package/skills/argent-ios-device-setup/SKILL.md +20 -0
  33. package/skills/argent-qa-flows/SKILL.md +2 -0
  34. package/skills/argent-screenshot-diff/SKILL.md +2 -0
package/README.md CHANGED
@@ -23,7 +23,7 @@ Argent drives a growing set of targets through a single toolkit, each with the r
23
23
 
24
24
  | Platform | Targets | Interaction |
25
25
  | ----------------- | ----------------------------------------------------------------------- | ---------------- |
26
- | **iOS** | Simulators | Touch / gesture |
26
+ | **iOS** | Simulators and physical iPhones (USB) | Touch / gesture |
27
27
  | **Android** | Emulators (AVDs) and physical devices over adb | Touch / gesture |
28
28
  | **TV** | Apple TV (tvOS), Android TV / Google TV, Amazon Fire TV (Vega) | D-pad / remote |
29
29
  | **Desktop & web** | Electron and Chromium apps (incl. React Native Web / Expo web) over CDP | Mouse / keyboard |
Binary file
Binary file
Binary file
Binary file
package/dist/cli-cmds.mjs CHANGED
@@ -2290,6 +2290,18 @@ var FAILURE_CODES = {
2290
2290
  SIMULATOR_COMMAND_REJECTED: "SIMULATOR_COMMAND_REJECTED",
2291
2291
  SIMULATOR_COMMAND_ACK_TIMEOUT: "SIMULATOR_COMMAND_ACK_TIMEOUT",
2292
2292
  SIMULATOR_COMMAND_TRANSPORT_FAILED: "SIMULATOR_COMMAND_TRANSPORT_FAILED",
2293
+ // Physical iOS devices: the XCUITest-runner blueprint lifecycle, the runner
2294
+ // command client, and the `xcrun devicectl` subprocess wrapper (simulators
2295
+ // use the SIMULATOR_* set).
2296
+ IOS_DEVICE_RUNNER_FACTORY_OPTIONS_MISSING: "IOS_DEVICE_RUNNER_FACTORY_OPTIONS_MISSING",
2297
+ IOS_DEVICE_RUNNER_NOT_READY: "IOS_DEVICE_RUNNER_NOT_READY",
2298
+ IOS_DEVICE_RUNNER_TERMINATED: "IOS_DEVICE_RUNNER_TERMINATED",
2299
+ IOS_DEVICE_RUNNER_EXITED: "IOS_DEVICE_RUNNER_EXITED",
2300
+ // The runner answered a command with an ok:false envelope.
2301
+ IOS_DEVICE_RUNNER_COMMAND_FAILED: "IOS_DEVICE_RUNNER_COMMAND_FAILED",
2302
+ // The usbmux or HTTP exchange with a reachable runner failed.
2303
+ IOS_DEVICE_RUNNER_TRANSPORT_FAILED: "IOS_DEVICE_RUNNER_TRANSPORT_FAILED",
2304
+ IOS_DEVICECTL_COMMAND_FAILED: "IOS_DEVICECTL_COMMAND_FAILED",
2293
2305
  AX_QUERY_TIMEOUT: "AX_QUERY_TIMEOUT",
2294
2306
  AX_DAEMON_READY_TIMEOUT: "AX_DAEMON_READY_TIMEOUT",
2295
2307
  AX_DAEMON_EXITED_BEFORE_READY: "AX_DAEMON_EXITED_BEFORE_READY",
@@ -2460,6 +2472,7 @@ var FAILURE_CODES = {
2460
2472
  KEYBOARD_KEY_UNSUPPORTED: "KEYBOARD_KEY_UNSUPPORTED",
2461
2473
  KEYBOARD_CHARACTER_UNSUPPORTED: "KEYBOARD_CHARACTER_UNSUPPORTED",
2462
2474
  KEYBOARD_TEXT_AND_KEY_COMBINED: "KEYBOARD_TEXT_AND_KEY_COMBINED",
2475
+ KEYBOARD_INPUT_NOT_FOCUSED: "KEYBOARD_INPUT_NOT_FOCUSED",
2463
2476
  SECRET_PLACEHOLDER_UNKNOWN: "SECRET_PLACEHOLDER_UNKNOWN",
2464
2477
  SCREENSHOT_DIFF_INPUT_INVALID: "SCREENSHOT_DIFF_INPUT_INVALID",
2465
2478
  BOOT_DEVICE_TARGET_SELECTION_INVALID: "BOOT_DEVICE_TARGET_SELECTION_INVALID",
@@ -2504,7 +2517,9 @@ var FAILURE_COMMANDS = [
2504
2517
  "electron",
2505
2518
  "npm",
2506
2519
  "npx",
2507
- "unknown"
2520
+ "unknown",
2521
+ "devicectl",
2522
+ "xcodebuild"
2508
2523
  ];
2509
2524
  var FAILURE_SIGNAL_NAMES = [
2510
2525
  "SIGABRT",
@@ -3292,6 +3307,14 @@ var CONFIG_SCHEMA = [
3292
3307
  // drained/reset, not just the file rewritten.
3293
3308
  manageCommand: "argent telemetry"
3294
3309
  },
3310
+ {
3311
+ key: "allowlist.enabled",
3312
+ description: "Whether `argent update` re-applies editor auto-approve allowlist rules. Unset (the default) keeps the current behavior: update refreshes the rules for editors that already have argent configured. Set to `false` to keep update from touching editor allowlists. `false` in either scope wins, so a committed project opt-out holds for every teammate.",
3313
+ scopes: ["project", "global"],
3314
+ parse: asBoolean,
3315
+ merge: "prioritize-restrictive",
3316
+ example: "false"
3317
+ },
3295
3318
  {
3296
3319
  key: "lens.agent",
3297
3320
  description: "Coding-agent id remembered by `argent lens` to skip the picker.",
@@ -7217,7 +7240,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
7217
7240
  var SESSION_ID2 = randomUUID5();
7218
7241
  function readCliVersion() {
7219
7242
  if (true) {
7220
- return "0.22.2-next.9";
7243
+ return "0.23.1-next.0";
7221
7244
  }
7222
7245
  return "0.0.0";
7223
7246
  }
@@ -15095,6 +15095,31 @@ function readConfigObject(scope = "global", options = {}) {
15095
15095
  }
15096
15096
  return {};
15097
15097
  }
15098
+ var FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
15099
+ function splitKey(dottedKey) {
15100
+ const parts = dottedKey.split(".");
15101
+ if (parts.length === 0 || parts.some((p) => p === "")) {
15102
+ throw new Error(`Invalid config key "${dottedKey}": empty path segment`);
15103
+ }
15104
+ for (const p of parts) {
15105
+ if (FORBIDDEN_SEGMENTS.has(p)) {
15106
+ throw new Error(`Invalid config key "${dottedKey}": forbidden segment "${p}"`);
15107
+ }
15108
+ }
15109
+ return parts;
15110
+ }
15111
+ function isPlainObject(value) {
15112
+ return !!value && typeof value === "object" && !Array.isArray(value);
15113
+ }
15114
+ function getAtPath(obj, dottedKey) {
15115
+ const parts = splitKey(dottedKey);
15116
+ let cur = obj;
15117
+ for (const part of parts) {
15118
+ if (!isPlainObject(cur)) return void 0;
15119
+ cur = cur[part];
15120
+ }
15121
+ return cur;
15122
+ }
15098
15123
  var LOCK_STALE_MS = 1e4;
15099
15124
  var LOCK_MAX_WAIT_MS = 2e3;
15100
15125
  var LOCK_RETRY_MS = 25;
@@ -15172,8 +15197,162 @@ var import_dotenv = __toESM(require_main(), 1);
15172
15197
  import * as fs4 from "node:fs";
15173
15198
  import * as path5 from "node:path";
15174
15199
 
15200
+ // ../configuration-core/src/merge.ts
15201
+ function mergeRestrictive(local, global2) {
15202
+ if (local === void 0) return global2;
15203
+ if (global2 === void 0) return local;
15204
+ if (typeof local === "boolean" && typeof global2 === "boolean") {
15205
+ return local && global2;
15206
+ }
15207
+ if (typeof local === "number" && typeof global2 === "number") {
15208
+ return Math.min(local, global2);
15209
+ }
15210
+ return local;
15211
+ }
15212
+ function toArray(value) {
15213
+ return Array.isArray(value) ? value : null;
15214
+ }
15215
+ function mergeUnion(local, global2) {
15216
+ const l2 = toArray(local);
15217
+ const g = toArray(global2);
15218
+ if (l2 === null && g === null) return local ?? global2;
15219
+ const merged = [...g ?? [], ...l2 ?? []];
15220
+ return Array.from(new Set(merged));
15221
+ }
15222
+ function mergeIntersection(local, global2) {
15223
+ const l2 = toArray(local);
15224
+ const g = toArray(global2);
15225
+ if (l2 === null && g === null) return local ?? global2;
15226
+ if (l2 === null) return global2;
15227
+ if (g === null) return local;
15228
+ const globalSet = new Set(g);
15229
+ return l2.filter((item) => globalSet.has(item));
15230
+ }
15231
+ function applyMergePolicy(policy, local, global2) {
15232
+ if (typeof policy === "function") return policy({ local, global: global2 });
15233
+ switch (policy) {
15234
+ case "prioritize-local":
15235
+ return local ?? global2;
15236
+ case "prioritize-global":
15237
+ return global2 ?? local;
15238
+ case "prioritize-restrictive":
15239
+ return mergeRestrictive(local, global2);
15240
+ case "union":
15241
+ return mergeUnion(local, global2);
15242
+ case "intersection":
15243
+ return mergeIntersection(local, global2);
15244
+ default: {
15245
+ const _exhaustive = policy;
15246
+ return _exhaustive;
15247
+ }
15248
+ }
15249
+ }
15250
+
15251
+ // ../configuration-core/src/config-schema.ts
15252
+ function asBoolean(raw) {
15253
+ return typeof raw === "boolean" ? raw : void 0;
15254
+ }
15255
+ function asString(raw) {
15256
+ if (typeof raw !== "string") return void 0;
15257
+ const trimmed = raw.trim();
15258
+ return trimmed === "" ? void 0 : trimmed;
15259
+ }
15260
+ function asStringArray(raw) {
15261
+ if (!Array.isArray(raw)) return void 0;
15262
+ const out = [];
15263
+ for (const item of raw) {
15264
+ if (typeof item === "string" && item.trim() !== "") out.push(item.trim());
15265
+ }
15266
+ return out;
15267
+ }
15268
+ var CONFIG_SCHEMA = [
15269
+ {
15270
+ key: "telemetry.enabled",
15271
+ description: "Whether anonymous opt-out telemetry is enabled (on by default; environment opt-outs like DO_NOT_TRACK are not reflected here \u2014 `argent telemetry status` shows effective consent). `false` in either scope wins, so a committed project opt-out holds for every teammate.",
15272
+ scopes: ["project", "global"],
15273
+ parse: asBoolean,
15274
+ merge: "prioritize-restrictive",
15275
+ // Opt-out: consent.ts reads an unstored value as enabled, so the config
15276
+ // surface must show the same rather than "(unset)".
15277
+ default: true,
15278
+ // Opt-in/out goes through the dedicated command so the live client is
15279
+ // drained/reset, not just the file rewritten.
15280
+ manageCommand: "argent telemetry"
15281
+ },
15282
+ {
15283
+ key: "allowlist.enabled",
15284
+ description: "Whether `argent update` re-applies editor auto-approve allowlist rules. Unset (the default) keeps the current behavior: update refreshes the rules for editors that already have argent configured. Set to `false` to keep update from touching editor allowlists. `false` in either scope wins, so a committed project opt-out holds for every teammate.",
15285
+ scopes: ["project", "global"],
15286
+ parse: asBoolean,
15287
+ merge: "prioritize-restrictive",
15288
+ example: "false"
15289
+ },
15290
+ {
15291
+ key: "lens.agent",
15292
+ description: "Coding-agent id remembered by `argent lens` to skip the picker.",
15293
+ scopes: ["project", "global"],
15294
+ parse: asString,
15295
+ merge: "prioritize-local",
15296
+ example: "claude"
15297
+ },
15298
+ {
15299
+ key: "ios.additionalDeviceSets",
15300
+ description: "Additional CoreSimulator device-set directories whose simulators argent should see alongside the default set. Absolute paths (or ~/\u2026); relative entries resolve against the project root (project scope) or home (global scope).",
15301
+ scopes: ["project", "global"],
15302
+ parse: asStringArray,
15303
+ // Additive rather than shadowing: global baseline first, project extras
15304
+ // after, deduplicated. `getAdditionalIosDeviceSets` re-implements this union
15305
+ // (path resolution must precede dedup) and guards on the preset staying "union".
15306
+ merge: "union",
15307
+ example: '["~/DeviceSets/ci"]'
15308
+ },
15309
+ {
15310
+ key: "recordings.directory",
15311
+ description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
15312
+ scopes: ["project", "global"],
15313
+ parse: asString,
15314
+ // Resolved on the client (the machine the mp4 is persisted to), so with a
15315
+ // remote `argent link` tool-server it is the *client's* config that decides.
15316
+ merge: "prioritize-local",
15317
+ example: "~/Movies/argent"
15318
+ }
15319
+ ];
15320
+ function getConfigDefinition(key, registry = CONFIG_SCHEMA) {
15321
+ return registry.find((def) => def.key === key);
15322
+ }
15323
+
15175
15324
  // ../configuration-core/src/config-access.ts
15176
15325
  import * as path6 from "node:path";
15326
+ function readScopeValue(def, scope, options) {
15327
+ if (!def.scopes.includes(scope)) return void 0;
15328
+ const raw = getAtPath(readConfigObject(scope, options), def.key);
15329
+ return raw === void 0 ? void 0 : def.parse(raw);
15330
+ }
15331
+ function getConfigValue(def, options = {}) {
15332
+ const local = readScopeValue(def, "project", options);
15333
+ const global2 = readScopeValue(def, "global", options);
15334
+ const merged = applyMergePolicy(def.merge, local, global2);
15335
+ return merged ?? def.default;
15336
+ }
15337
+ function getConfigValueByKey(key, options = {}, registry = CONFIG_SCHEMA) {
15338
+ const def = requireDefinition(key, registry);
15339
+ return getConfigValue(def, options);
15340
+ }
15341
+ function requireDefinition(key, registry = CONFIG_SCHEMA) {
15342
+ const def = getConfigDefinition(key, registry);
15343
+ if (!def) {
15344
+ throw new UnknownConfigKeyError(key);
15345
+ }
15346
+ return def;
15347
+ }
15348
+ var UnknownConfigKeyError = class extends Error {
15349
+ constructor(key) {
15350
+ super(`Unknown configuration key "${key}".`);
15351
+ this.key = key;
15352
+ this.name = "UnknownConfigKeyError";
15353
+ }
15354
+ key;
15355
+ };
15177
15356
 
15178
15357
  // ../telemetry/src/paths.ts
15179
15358
  function identityFilePath() {
@@ -15446,6 +15625,18 @@ var FAILURE_CODES = {
15446
15625
  SIMULATOR_COMMAND_REJECTED: "SIMULATOR_COMMAND_REJECTED",
15447
15626
  SIMULATOR_COMMAND_ACK_TIMEOUT: "SIMULATOR_COMMAND_ACK_TIMEOUT",
15448
15627
  SIMULATOR_COMMAND_TRANSPORT_FAILED: "SIMULATOR_COMMAND_TRANSPORT_FAILED",
15628
+ // Physical iOS devices: the XCUITest-runner blueprint lifecycle, the runner
15629
+ // command client, and the `xcrun devicectl` subprocess wrapper (simulators
15630
+ // use the SIMULATOR_* set).
15631
+ IOS_DEVICE_RUNNER_FACTORY_OPTIONS_MISSING: "IOS_DEVICE_RUNNER_FACTORY_OPTIONS_MISSING",
15632
+ IOS_DEVICE_RUNNER_NOT_READY: "IOS_DEVICE_RUNNER_NOT_READY",
15633
+ IOS_DEVICE_RUNNER_TERMINATED: "IOS_DEVICE_RUNNER_TERMINATED",
15634
+ IOS_DEVICE_RUNNER_EXITED: "IOS_DEVICE_RUNNER_EXITED",
15635
+ // The runner answered a command with an ok:false envelope.
15636
+ IOS_DEVICE_RUNNER_COMMAND_FAILED: "IOS_DEVICE_RUNNER_COMMAND_FAILED",
15637
+ // The usbmux or HTTP exchange with a reachable runner failed.
15638
+ IOS_DEVICE_RUNNER_TRANSPORT_FAILED: "IOS_DEVICE_RUNNER_TRANSPORT_FAILED",
15639
+ IOS_DEVICECTL_COMMAND_FAILED: "IOS_DEVICECTL_COMMAND_FAILED",
15449
15640
  AX_QUERY_TIMEOUT: "AX_QUERY_TIMEOUT",
15450
15641
  AX_DAEMON_READY_TIMEOUT: "AX_DAEMON_READY_TIMEOUT",
15451
15642
  AX_DAEMON_EXITED_BEFORE_READY: "AX_DAEMON_EXITED_BEFORE_READY",
@@ -15616,6 +15807,7 @@ var FAILURE_CODES = {
15616
15807
  KEYBOARD_KEY_UNSUPPORTED: "KEYBOARD_KEY_UNSUPPORTED",
15617
15808
  KEYBOARD_CHARACTER_UNSUPPORTED: "KEYBOARD_CHARACTER_UNSUPPORTED",
15618
15809
  KEYBOARD_TEXT_AND_KEY_COMBINED: "KEYBOARD_TEXT_AND_KEY_COMBINED",
15810
+ KEYBOARD_INPUT_NOT_FOCUSED: "KEYBOARD_INPUT_NOT_FOCUSED",
15619
15811
  SECRET_PLACEHOLDER_UNKNOWN: "SECRET_PLACEHOLDER_UNKNOWN",
15620
15812
  SCREENSHOT_DIFF_INPUT_INVALID: "SCREENSHOT_DIFF_INPUT_INVALID",
15621
15813
  BOOT_DEVICE_TARGET_SELECTION_INVALID: "BOOT_DEVICE_TARGET_SELECTION_INVALID",
@@ -15660,7 +15852,9 @@ var FAILURE_COMMANDS = [
15660
15852
  "electron",
15661
15853
  "npm",
15662
15854
  "npx",
15663
- "unknown"
15855
+ "unknown",
15856
+ "devicectl",
15857
+ "xcodebuild"
15664
15858
  ];
15665
15859
  var FAILURE_SIGNAL_NAMES = [
15666
15860
  "SIGABRT",
@@ -16431,7 +16625,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16431
16625
  var SESSION_ID = randomUUID4();
16432
16626
  function readCliVersion() {
16433
16627
  if (true) {
16434
- return "0.22.2-next.9";
16628
+ return "0.23.1-next.0";
16435
16629
  }
16436
16630
  return "0.0.0";
16437
16631
  }
@@ -23372,12 +23566,15 @@ async function update(args) {
23372
23566
  )
23373
23567
  );
23374
23568
  }
23375
- for (const [scope, adapters] of adaptersByScope) {
23376
- for (const adapter of adapters) {
23377
- if (!adapter.addAllowlist) continue;
23378
- try {
23379
- adapter.addAllowlist(projectRoot, scope);
23380
- } catch {
23569
+ const allowlistDisabled = getConfigValueByKey("allowlist.enabled", { cwd: projectRoot }) === false;
23570
+ if (!allowlistDisabled) {
23571
+ for (const [scope, adapters] of adaptersByScope) {
23572
+ for (const adapter of adapters) {
23573
+ if (!adapter.addAllowlist) continue;
23574
+ try {
23575
+ adapter.addAllowlist(projectRoot, scope);
23576
+ } catch {
23577
+ }
23381
23578
  }
23382
23579
  }
23383
23580
  }
@@ -23388,6 +23585,11 @@ async function update(args) {
23388
23585
  ...copyRulesAndAgents(localAdapters, projectRoot, "local", RULES_DIR, AGENTS_DIR)
23389
23586
  ];
23390
23587
  spinner2.stop("Configuration refreshed.");
23588
+ if (allowlistDisabled) {
23589
+ log.info(
23590
+ import_picocolors11.default.dim("Left editor auto-approve allowlists alone (allowlist.enabled is false).")
23591
+ );
23592
+ }
23391
23593
  if (results.length > 0) {
23392
23594
  note(results.join("\n"), "MCP Configs Updated");
23393
23595
  }
@@ -0,0 +1,37 @@
1
+ import UIKit
2
+
3
+ /// Placeholder host application for the Argent runner's UI-test bundle.
4
+ ///
5
+ /// It never participates in automation (every command targets another app by
6
+ /// bundle id), but XCUITest requires a host app to exist, and testmanagerd
7
+ /// launches it once when the session starts. The single black screen makes it
8
+ /// obvious on the device that the runner, not a user app, is frontmost.
9
+ @main
10
+ final class RunnerHostAppDelegate: UIResponder, UIApplicationDelegate {
11
+ var window: UIWindow?
12
+
13
+ func application(
14
+ _ application: UIApplication,
15
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
16
+ ) -> Bool {
17
+ let controller = UIViewController()
18
+ controller.view.backgroundColor = .black
19
+
20
+ let label = UILabel()
21
+ label.text = "Argent Runner"
22
+ label.textColor = .white
23
+ label.font = .systemFont(ofSize: 22, weight: .semibold)
24
+ label.translatesAutoresizingMaskIntoConstraints = false
25
+ controller.view.addSubview(label)
26
+ NSLayoutConstraint.activate([
27
+ label.centerXAnchor.constraint(equalTo: controller.view.centerXAnchor),
28
+ label.centerYAnchor.constraint(equalTo: controller.view.centerYAnchor),
29
+ ])
30
+
31
+ let window = UIWindow(frame: UIScreen.main.bounds)
32
+ window.rootViewController = controller
33
+ window.makeKeyAndVisible()
34
+ self.window = window
35
+ return true
36
+ }
37
+ }