craft-native 0.0.55 → 0.0.74

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 (146) hide show
  1. package/dist/android/src/index.d.ts +73 -0
  2. package/dist/android/src/index.js +177 -37
  3. package/dist/android/templates/AndroidManifest.xml.template +10 -36
  4. package/dist/android/templates/CraftBridge.kt.template +192 -60
  5. package/dist/android/templates/CraftHealthConnect.kt.template +200 -0
  6. package/dist/android/templates/CraftHealthConnectStub.kt.template +28 -0
  7. package/dist/android/templates/LocationRecordingService.kt.template +160 -0
  8. package/dist/android/templates/MainActivity.kt.template +140 -19
  9. package/dist/android/templates/build.gradle.kts.app.template +23 -1
  10. package/dist/android/templates/build.gradle.kts.project.template +3 -2
  11. package/dist/android/templates/proguard-rules.pro.template +9 -0
  12. package/dist/api/android-advanced.d.ts +5 -6
  13. package/dist/api/app.d.ts +0 -1
  14. package/dist/api/clipboard.d.ts +0 -1
  15. package/dist/api/crypto.d.ts +1 -2
  16. package/dist/api/db.d.ts +1 -2
  17. package/dist/api/dialog.d.ts +0 -1
  18. package/dist/api/fs.d.ts +1 -2
  19. package/dist/api/gestures.d.ts +66 -0
  20. package/dist/api/http.d.ts +1 -2
  21. package/dist/api/index.d.ts +37 -34
  22. package/dist/api/ios-advanced.d.ts +6 -7
  23. package/dist/api/macos-advanced.d.ts +2 -3
  24. package/dist/api/media.d.ts +0 -1
  25. package/dist/api/mobile.d.ts +109 -1
  26. package/dist/api/process.d.ts +0 -1
  27. package/dist/api/sidebar.d.ts +3 -20
  28. package/dist/api/spaces.d.ts +83 -0
  29. package/dist/api/tray.d.ts +2 -3
  30. package/dist/api/window.d.ts +1 -2
  31. package/dist/api/windows-advanced.d.ts +6 -7
  32. package/dist/assets/index.d.ts +0 -1
  33. package/dist/binary-resolver.d.ts +23 -1
  34. package/dist/bridge/android.d.ts +0 -1
  35. package/dist/bridge/core.d.ts +0 -38
  36. package/dist/bridge/ids.d.ts +0 -1
  37. package/dist/bridge/ios.d.ts +0 -1
  38. package/dist/bridge/webkit-pending.d.ts +0 -1
  39. package/dist/build/bundle-optimizer.d.ts +0 -1
  40. package/dist/cli.js +666 -90
  41. package/dist/components/index.d.ts +6 -7
  42. package/dist/components/native.d.ts +0 -1
  43. package/dist/components/sidebar.d.ts +2 -81
  44. package/dist/dev/devtools.d.ts +0 -1
  45. package/dist/dev/error-overlay.d.ts +0 -1
  46. package/dist/dev/hot-reload.d.ts +0 -1
  47. package/dist/index.cjs +113 -3
  48. package/dist/index.d.cts +16 -16
  49. package/dist/index.d.ts +16 -16
  50. package/dist/index.js +112 -4
  51. package/dist/ios/src/index.d.ts +172 -0
  52. package/dist/ios/src/index.js +440 -42
  53. package/dist/ios/templates/CraftActivityAttributes.swift +14 -0
  54. package/dist/ios/templates/CraftApp.swift +1001 -73
  55. package/dist/ios/templates/CraftLiveActivityWidget.swift.template +62 -0
  56. package/dist/ios/templates/CraftWatchApp.swift.template +155 -0
  57. package/dist/ios/templates/Info.plist.template +10 -9
  58. package/dist/ios/templates/WatchApp.Info.plist.template +26 -0
  59. package/dist/ios/templates/WidgetExtension.Info.plist +31 -0
  60. package/dist/ios/templates/project.yml.template +12 -1
  61. package/dist/logging/index.d.ts +0 -1
  62. package/dist/mobile.d.ts +8 -0
  63. package/dist/mobile.js +755 -0
  64. package/dist/optimizations/index.d.ts +3 -4
  65. package/dist/package.d.ts +11 -1
  66. package/dist/performance/runtime.d.ts +0 -1
  67. package/dist/performance/startup.d.ts +0 -1
  68. package/dist/plugins/index.d.ts +0 -1
  69. package/dist/security/index.d.ts +0 -1
  70. package/dist/sidebar-types.d.ts +102 -0
  71. package/dist/signing/index.d.ts +0 -1
  72. package/dist/styles/headwind.d.ts +0 -1
  73. package/dist/styles/index.d.ts +9 -10
  74. package/dist/styles/sidebar-templates.d.ts +0 -1
  75. package/dist/styles/sidebars.d.ts +0 -1
  76. package/dist/types.d.ts +131 -1
  77. package/dist/updater/index.d.ts +0 -1
  78. package/dist/utils/audio.d.ts +0 -1
  79. package/dist/utils/index.d.ts +4 -5
  80. package/dist/utils/native.d.ts +1 -2
  81. package/dist/utils/react.d.ts +0 -1
  82. package/dist/utils/storage.d.ts +0 -1
  83. package/dist/utils/svelte.d.ts +0 -1
  84. package/dist/utils/timer.d.ts +0 -1
  85. package/dist/utils/vue.d.ts +0 -1
  86. package/package.json +32 -4
  87. package/dist/android/src/index.js.map +0 -10
  88. package/dist/api/android-advanced.d.ts.map +0 -1
  89. package/dist/api/app.d.ts.map +0 -1
  90. package/dist/api/clipboard.d.ts.map +0 -1
  91. package/dist/api/crypto.d.ts.map +0 -1
  92. package/dist/api/db.d.ts.map +0 -1
  93. package/dist/api/dialog.d.ts.map +0 -1
  94. package/dist/api/fs.d.ts.map +0 -1
  95. package/dist/api/http.d.ts.map +0 -1
  96. package/dist/api/index.d.ts.map +0 -1
  97. package/dist/api/ios-advanced.d.ts.map +0 -1
  98. package/dist/api/macos-advanced.d.ts.map +0 -1
  99. package/dist/api/media.d.ts.map +0 -1
  100. package/dist/api/mobile.d.ts.map +0 -1
  101. package/dist/api/process.d.ts.map +0 -1
  102. package/dist/api/sidebar.d.ts.map +0 -1
  103. package/dist/api/tray.d.ts.map +0 -1
  104. package/dist/api/window.d.ts.map +0 -1
  105. package/dist/api/windows-advanced.d.ts.map +0 -1
  106. package/dist/assets/index.d.ts.map +0 -1
  107. package/dist/binary-resolver.d.ts.map +0 -1
  108. package/dist/bridge/android.d.ts.map +0 -1
  109. package/dist/bridge/core.d.ts.map +0 -1
  110. package/dist/bridge/ids.d.ts.map +0 -1
  111. package/dist/bridge/ios.d.ts.map +0 -1
  112. package/dist/bridge/webkit-pending.d.ts.map +0 -1
  113. package/dist/build/bundle-optimizer.d.ts.map +0 -1
  114. package/dist/components/index.d.ts.map +0 -1
  115. package/dist/components/native.d.ts.map +0 -1
  116. package/dist/components/sidebar.d.ts.map +0 -1
  117. package/dist/dev/devtools.d.ts.map +0 -1
  118. package/dist/dev/error-overlay.d.ts.map +0 -1
  119. package/dist/dev/hot-reload.d.ts.map +0 -1
  120. package/dist/index.d.ts.map +0 -1
  121. package/dist/index.js.map +0 -45
  122. package/dist/ios/src/index.js.map +0 -10
  123. package/dist/logging/index.d.ts.map +0 -1
  124. package/dist/optimizations/index.d.ts.map +0 -1
  125. package/dist/package.d.ts.map +0 -1
  126. package/dist/package.test.d.ts +0 -2
  127. package/dist/package.test.d.ts.map +0 -1
  128. package/dist/performance/runtime.d.ts.map +0 -1
  129. package/dist/performance/startup.d.ts.map +0 -1
  130. package/dist/plugins/index.d.ts.map +0 -1
  131. package/dist/security/index.d.ts.map +0 -1
  132. package/dist/signing/index.d.ts.map +0 -1
  133. package/dist/styles/headwind.d.ts.map +0 -1
  134. package/dist/styles/index.d.ts.map +0 -1
  135. package/dist/styles/sidebar-templates.d.ts.map +0 -1
  136. package/dist/styles/sidebars.d.ts.map +0 -1
  137. package/dist/types.d.ts.map +0 -1
  138. package/dist/updater/index.d.ts.map +0 -1
  139. package/dist/utils/audio.d.ts.map +0 -1
  140. package/dist/utils/index.d.ts.map +0 -1
  141. package/dist/utils/native.d.ts.map +0 -1
  142. package/dist/utils/react.d.ts.map +0 -1
  143. package/dist/utils/storage.d.ts.map +0 -1
  144. package/dist/utils/svelte.d.ts.map +0 -1
  145. package/dist/utils/timer.d.ts.map +0 -1
  146. package/dist/utils/vue.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -659,6 +659,9 @@ function windowsExecutableName(name) {
659
659
  throw new Error(`Reserved Windows application name: ${JSON.stringify(name)}`);
660
660
  return `${name}.exe`;
661
661
  }
662
+ function candleArguments(architecture, wixobjPath, wxsPath) {
663
+ return ["-nologo", "-arch", architecture, "-out", wixobjPath, wxsPath];
664
+ }
662
665
  function runCommand(command, args, cwd) {
663
666
  return new Promise((resolve, reject) => {
664
667
  const child = spawn(command, args, { cwd, stdio: "inherit", windowsHide: true });
@@ -675,7 +678,7 @@ async function createMSI(opts) {
675
678
  const wixobjPath = join(tempDir, "installer.wixobj");
676
679
  copyFileSync(opts.binaryPath, sourcePath);
677
680
  writeFileSync(wxsPath, renderWixSource(opts, binaryName));
678
- await runCommand("candle.exe", ["-nologo", "-out", wixobjPath, wxsPath], tempDir);
681
+ await runCommand("candle.exe", candleArguments(opts.architecture, wixobjPath, wxsPath), tempDir);
679
682
  await runCommand("light.exe", ["-nologo", "-sval", "-out", opts.outputPath, wixobjPath], tempDir);
680
683
  if (opts.certificatePath) {
681
684
  const signArgs = ["sign", "/fd", "sha256", "/tr", "https://timestamp.digicert.com", "/td", "sha256", "/f", opts.certificatePath];
@@ -4564,6 +4567,8 @@ var secureStorage = {
4564
4567
  if (typeof window !== "undefined" && craft?.secureStorage) {
4565
4568
  return craft.secureStorage.set(key, value);
4566
4569
  }
4570
+ if (typeof window !== "undefined" && window.craft)
4571
+ throw new Error("Craft secure storage bridge is unavailable");
4567
4572
  localStorage.setItem(`secure_${key}`, value);
4568
4573
  },
4569
4574
  async get(key) {
@@ -4571,6 +4576,8 @@ var secureStorage = {
4571
4576
  if (typeof window !== "undefined" && craft?.secureStorage) {
4572
4577
  return craft.secureStorage.get(key);
4573
4578
  }
4579
+ if (typeof window !== "undefined" && window.craft)
4580
+ throw new Error("Craft secure storage bridge is unavailable");
4574
4581
  return localStorage.getItem(`secure_${key}`);
4575
4582
  },
4576
4583
  async delete(key) {
@@ -4578,6 +4585,8 @@ var secureStorage = {
4578
4585
  if (typeof window !== "undefined" && craft?.secureStorage) {
4579
4586
  return craft.secureStorage.delete(key);
4580
4587
  }
4588
+ if (typeof window !== "undefined" && window.craft)
4589
+ throw new Error("Craft secure storage bridge is unavailable");
4581
4590
  localStorage.removeItem(`secure_${key}`);
4582
4591
  },
4583
4592
  async clear() {
@@ -4585,9 +4594,19 @@ var secureStorage = {
4585
4594
  if (typeof window !== "undefined" && craft?.secureStorage) {
4586
4595
  return craft.secureStorage.clear();
4587
4596
  }
4597
+ if (typeof window !== "undefined" && window.craft)
4598
+ throw new Error("Craft secure storage bridge is unavailable");
4588
4599
  Object.keys(localStorage).filter((k) => k.startsWith("secure_")).forEach((k) => localStorage.removeItem(k));
4589
4600
  }
4590
4601
  };
4602
+ var webLocationRecording = {
4603
+ id: null,
4604
+ active: false,
4605
+ paused: false,
4606
+ startedAt: null,
4607
+ locations: []
4608
+ };
4609
+ var webLocationRecordingWatchId = null;
4591
4610
  var location = {
4592
4611
  async getCurrentPosition(options = {}) {
4593
4612
  const craft = getCraftMobile();
@@ -4635,6 +4654,63 @@ var location = {
4635
4654
  return craft.location.clearWatch(watchId);
4636
4655
  }
4637
4656
  navigator.geolocation.clearWatch(watchId);
4657
+ },
4658
+ async startRecording(options = {}) {
4659
+ const craft = getCraftMobile();
4660
+ if (typeof window !== "undefined" && craft?.location?.startRecording)
4661
+ return craft.location.startRecording(options);
4662
+ if (webLocationRecordingWatchId !== null)
4663
+ navigator.geolocation.clearWatch(webLocationRecordingWatchId);
4664
+ webLocationRecording = {
4665
+ id: secureUUID(),
4666
+ active: true,
4667
+ paused: false,
4668
+ startedAt: Date.now(),
4669
+ locations: []
4670
+ };
4671
+ webLocationRecordingWatchId = location.watchPosition((position) => {
4672
+ if (!webLocationRecording.paused)
4673
+ webLocationRecording.locations.push(position);
4674
+ }, options);
4675
+ return { ...webLocationRecording, sampleCount: 0 };
4676
+ },
4677
+ async pauseRecording() {
4678
+ const craft = getCraftMobile();
4679
+ if (typeof window !== "undefined" && craft?.location?.pauseRecording)
4680
+ return craft.location.pauseRecording();
4681
+ webLocationRecording.paused = true;
4682
+ return { ...webLocationRecording, sampleCount: webLocationRecording.locations.length };
4683
+ },
4684
+ async resumeRecording() {
4685
+ const craft = getCraftMobile();
4686
+ if (typeof window !== "undefined" && craft?.location?.resumeRecording)
4687
+ return craft.location.resumeRecording();
4688
+ webLocationRecording.paused = false;
4689
+ return { ...webLocationRecording, sampleCount: webLocationRecording.locations.length };
4690
+ },
4691
+ async stopRecording() {
4692
+ const craft = getCraftMobile();
4693
+ if (typeof window !== "undefined" && craft?.location?.stopRecording)
4694
+ return craft.location.stopRecording();
4695
+ if (webLocationRecordingWatchId !== null) {
4696
+ location.clearWatch(webLocationRecordingWatchId);
4697
+ webLocationRecordingWatchId = null;
4698
+ }
4699
+ webLocationRecording.active = false;
4700
+ webLocationRecording.paused = false;
4701
+ return { ...webLocationRecording, locations: [...webLocationRecording.locations] };
4702
+ },
4703
+ async getRecordingState() {
4704
+ const craft = getCraftMobile();
4705
+ if (typeof window !== "undefined" && craft?.location?.getRecordingState)
4706
+ return craft.location.getRecordingState();
4707
+ return { ...webLocationRecording, sampleCount: webLocationRecording.locations.length };
4708
+ },
4709
+ async readRecording() {
4710
+ const craft = getCraftMobile();
4711
+ if (typeof window !== "undefined" && craft?.location?.readRecording)
4712
+ return craft.location.readRecording();
4713
+ return [...webLocationRecording.locations];
4638
4714
  }
4639
4715
  };
4640
4716
  var share = {
@@ -7025,6 +7101,29 @@ var sidebar = {
7025
7101
  settings: createSettingsSidebar,
7026
7102
  Sidebar
7027
7103
  };
7104
+ // src/api/spaces.ts
7105
+ function hasNativeSpaces() {
7106
+ const nativeUI = globalThis.window?.craft?.nativeUI;
7107
+ return typeof nativeUI?.createSpacesSidebar === "function";
7108
+ }
7109
+ function createSpacesSidebar(options = {}) {
7110
+ const nativeUI = globalThis.window?.craft?.nativeUI;
7111
+ if (typeof nativeUI?.createSpacesSidebar !== "function")
7112
+ return null;
7113
+ return nativeUI.createSpacesSidebar(options);
7114
+ }
7115
+ var spaces = { hasNativeSpaces, createSpacesSidebar };
7116
+ // src/api/gestures.ts
7117
+ function hasNativeGestures() {
7118
+ return typeof globalThis.window?.craft?.gestures?.onSwipe === "function";
7119
+ }
7120
+ function onSwipe(listener) {
7121
+ const gestures = globalThis.window?.craft?.gestures;
7122
+ if (typeof gestures?.onSwipe !== "function")
7123
+ return () => {};
7124
+ return gestures.onSwipe(listener);
7125
+ }
7126
+ var gestures = { hasNativeGestures, onSwipe };
7028
7127
  // src/components/index.ts
7029
7128
  var exports_components = {};
7030
7129
  __export(exports_components, {
@@ -10173,7 +10272,7 @@ async function probeBinaryVersion(craftPath) {
10173
10272
  return;
10174
10273
  try {
10175
10274
  const { stdout } = await execFileAsync(craftPath, ["--version"], { timeout: 2000 });
10176
- const nativeVersion = stdout.trim().replace(/^v/, "");
10275
+ const nativeVersion = parseCraftVersionOutput(stdout);
10177
10276
  const sdkVersion = getSdkVersion();
10178
10277
  if (sdkVersion !== "unknown" && nativeVersion && nativeVersion !== sdkVersion) {
10179
10278
  versionMismatchWarned = true;
@@ -10182,6 +10281,10 @@ async function probeBinaryVersion(craftPath) {
10182
10281
  }
10183
10282
  } catch {}
10184
10283
  }
10284
+ function parseCraftVersionOutput(output) {
10285
+ const firstLine = output.trim().split(/\r?\n/, 1)[0] ?? "";
10286
+ return firstLine.replace(/^craft version\s+/i, "").replace(/^v/, "").trim();
10287
+ }
10185
10288
  function detectDevMode() {
10186
10289
  if (typeof process === "undefined")
10187
10290
  return false;
@@ -10439,6 +10542,7 @@ export {
10439
10542
  stageManager,
10440
10543
  spotlight,
10441
10544
  spawn2 as spawn,
10545
+ spaces,
10442
10546
  sidecar,
10443
10547
  sidebarUtils,
10444
10548
  sidebarSeparator,
@@ -10484,6 +10588,7 @@ export {
10484
10588
  playBilling,
10485
10589
  photoPicker,
10486
10590
  permissions,
10591
+ parseCraftVersionOutput,
10487
10592
  packageApp,
10488
10593
  pack,
10489
10594
  orbstackStyles,
@@ -10493,6 +10598,7 @@ export {
10493
10598
  openFile,
10494
10599
  openDatabase,
10495
10600
  open,
10601
+ onSwipe,
10496
10602
  notify,
10497
10603
  notifications,
10498
10604
  notifications as notification,
@@ -10518,6 +10624,8 @@ export {
10518
10624
  hideDockIcon,
10519
10625
  hide,
10520
10626
  hashPassword,
10627
+ hasNativeSpaces,
10628
+ hasNativeGestures,
10521
10629
  haptics,
10522
10630
  handoff,
10523
10631
  getVersion,
@@ -10531,6 +10639,7 @@ export {
10531
10639
  getInfo,
10532
10640
  getFullPageHTML,
10533
10641
  getCraft,
10642
+ gestures,
10534
10643
  generateUpdateManifest,
10535
10644
  generateConfig,
10536
10645
  fs,
@@ -10551,6 +10660,7 @@ export {
10551
10660
  createTahoeSidebar,
10552
10661
  createTableView,
10553
10662
  createSplitView,
10663
+ createSpacesSidebar,
10554
10664
  createSidebar,
10555
10665
  createSettingsSidebar,
10556
10666
  createProgress,
@@ -10609,5 +10719,3 @@ export {
10609
10719
  AudioManager,
10610
10720
  Animated
10611
10721
  };
10612
-
10613
- //# debugId=FE159EB156F1D52064756E2164756E21
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Craft iOS Builder
3
+ *
4
+ * Generates native iOS apps from web content using WKWebView.
5
+ */
6
+ export interface CraftConfig {
7
+ appName: string;
8
+ bundleId: string;
9
+ version?: string;
10
+ buildNumber?: string;
11
+ darkMode?: boolean;
12
+ backgroundColor?: string;
13
+ enableSpeechRecognition?: boolean;
14
+ enableHaptics?: boolean;
15
+ enableShare?: boolean;
16
+ enableCamera?: boolean;
17
+ enableBiometric?: boolean;
18
+ enablePushNotifications?: boolean;
19
+ enableSecureStorage?: boolean;
20
+ enableGeolocation?: boolean;
21
+ enableClipboard?: boolean;
22
+ enableContacts?: boolean;
23
+ enableCalendar?: boolean;
24
+ enableLocalNotifications?: boolean;
25
+ enableInAppPurchase?: boolean;
26
+ enableKeepAwake?: boolean;
27
+ enableOrientationLock?: boolean;
28
+ enableDeepLinks?: boolean;
29
+ enableQRScanner?: boolean;
30
+ enableFilePicker?: boolean;
31
+ enableFileDownload?: boolean;
32
+ enableSocialAuth?: boolean;
33
+ enableAudioRecording?: boolean;
34
+ enableVideoRecording?: boolean;
35
+ enableMotionSensors?: boolean;
36
+ enableLocalDatabase?: boolean;
37
+ enableBluetooth?: boolean;
38
+ enableNFC?: boolean;
39
+ enableHealthKit?: boolean;
40
+ enableLiveActivities?: boolean;
41
+ enableWatchApp?: boolean;
42
+ enableBackgroundLocation?: boolean;
43
+ enableBackgroundTasks?: boolean;
44
+ enableScreenCapture?: boolean;
45
+ enablePDFViewer?: boolean;
46
+ enableAR?: boolean;
47
+ enableMLKit?: boolean;
48
+ devServerURL?: string;
49
+ iosVersion?: string;
50
+ watchosVersion?: string;
51
+ teamId?: string;
52
+ urlSchemes?: string[];
53
+ trustedOrigins?: string[];
54
+ associatedDomains?: string[];
55
+ appGroups?: string[];
56
+ appIconPath?: string;
57
+ privacy?: CraftPrivacyManifest;
58
+ orientations?: Array<'portrait' | 'landscape-left' | 'landscape-right' | 'portrait-upside-down'>;
59
+ deviceFamilies?: Array<'iphone' | 'ipad'>;
60
+ }
61
+ export interface CraftPrivacyDataType {
62
+ type: string;
63
+ linked?: boolean;
64
+ tracking?: boolean;
65
+ purposes: string[];
66
+ }
67
+ export interface CraftPrivacyAccessedApiType {
68
+ type: string;
69
+ reasons: string[];
70
+ }
71
+ export interface CraftPrivacyManifest {
72
+ tracking?: boolean;
73
+ trackingDomains?: string[];
74
+ collectedDataTypes?: CraftPrivacyDataType[];
75
+ accessedApiTypes?: CraftPrivacyAccessedApiType[];
76
+ }
77
+ export interface InitOptions {
78
+ name: string;
79
+ bundleId?: string;
80
+ teamId?: string;
81
+ output: string;
82
+ config?: Partial<CraftConfig>;
83
+ }
84
+ export interface BuildOptions {
85
+ htmlPath?: string;
86
+ devServer?: string;
87
+ output: string;
88
+ generateProject?: boolean;
89
+ }
90
+ export interface OpenOptions {
91
+ output: string;
92
+ }
93
+ export interface RunOptions {
94
+ simulator: boolean;
95
+ output: string;
96
+ }
97
+ export declare function renderDeviceFamilies(config: CraftConfig): string;
98
+ export declare function renderUsageDescriptions(config: CraftConfig): string;
99
+ export declare function renderOrientations(config: CraftConfig): string;
100
+ export declare function renderUrlTypes(config: CraftConfig): string;
101
+ export declare function renderBackgroundModes(config: CraftConfig): string;
102
+ export declare function renderEntitlements(config: CraftConfig): string;
103
+ export declare function renderWatchEntitlements(config: CraftConfig): string;
104
+ export declare function renderPrivacyManifest(config: CraftConfig): string;
105
+ /** Replace the bundled web application atomically so removed assets cannot linger. */
106
+ export declare function syncWebAssets(source: string, output: string): void;
107
+ /**
108
+ * Initialize a new iOS project
109
+ */
110
+ export declare function init(options: InitOptions): Promise<void>;
111
+ /**
112
+ * Build web assets and generate Xcode project
113
+ */
114
+ export declare function build(options: BuildOptions): Promise<void>;
115
+ /**
116
+ * Open Xcode project
117
+ */
118
+ export declare function open(options: OpenOptions): Promise<void>;
119
+ /**
120
+ * Build and run on simulator or device
121
+ */
122
+ /** One bootable simulator, as `simctl list` describes it. */
123
+ export interface SimulatorDevice {
124
+ name: string;
125
+ udid: string;
126
+ state: string;
127
+ runtime: string;
128
+ }
129
+ /**
130
+ * Every available simulator, newest runtime first, iPhones before iPads.
131
+ *
132
+ * Exported because the choice is worth testing without a simulator present -
133
+ * `pickSimulator` is the policy and this is the data it reads.
134
+ */
135
+ export declare function orderSimulators(devices: SimulatorDevice[]): SimulatorDevice[];
136
+ /**
137
+ * The device to run on.
138
+ *
139
+ * A booted one first - if the developer already has a simulator open, that is
140
+ * the one they are looking at - then the newest iPhone.
141
+ *
142
+ * This used to be the string `iPhone 15`, hard-coded into the `-destination`
143
+ * argument. On a machine whose Xcode ships iPhone 17 and no iPhone 15, that is
144
+ * not a fallback, it is `xcodebuild: error: Unable to find a device named
145
+ * 'iPhone 15'` - the command fails for a reason that has nothing to do with the
146
+ * app being built, and the fix is invisible from the error.
147
+ */
148
+ export declare function pickSimulator(): Promise<SimulatorDevice | null>;
149
+ /**
150
+ * Boot it, and wait until it can actually do something.
151
+ *
152
+ * `simctl boot` returns as soon as the device starts booting, and a device
153
+ * that reports `Booted` is minutes away from being able to install anything on
154
+ * a cold runtime. `bootstatus` is the wait, and skipping it is why a first run
155
+ * on a fresh machine fails where the second succeeds.
156
+ */
157
+ export declare function bootSimulator(device: SimulatorDevice): Promise<void>;
158
+ /**
159
+ * Bring the Simulator window to the front, if it can be found.
160
+ *
161
+ * `open -a Simulator` resolves through LaunchServices, and LaunchServices only
162
+ * knows the name if a Simulator.app has been registered under it - which is not
163
+ * true on a machine running Xcode-beta, where the answer is `Unable to find
164
+ * application named 'Simulator'`. The app is always at a known path under the
165
+ * *selected* developer directory, so that is tried first.
166
+ *
167
+ * Never throws. The window is a convenience: the app is installed and launched
168
+ * either way, and failing the whole run because a window did not come to the
169
+ * front would be reporting a cosmetic problem as a build failure.
170
+ */
171
+ export declare function showSimulator(): Promise<void>;
172
+ export declare function run(options: RunOptions): Promise<void>;