peachsim 0.1.1673 → 0.1.1684

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 (213) hide show
  1. package/cli/commands/control.ts +13 -1
  2. package/cli/commands/coverage-swift.ts +83 -27
  3. package/cli/commands/coverage.ts +219 -20
  4. package/cli/commands/detect.ts +10 -6
  5. package/cli/commands/inspect/core.ts +2 -0
  6. package/cli/commands/inspect/settling.ts +37 -4
  7. package/cli/commands/inspect/wait-ready.ts +7 -0
  8. package/cli/outbound-endpoints.ts +12 -0
  9. package/detox/index.ts +11 -1
  10. package/detox/jest-environment.cjs +14 -0
  11. package/dist-lib/agent-daemon-client.cjs +1 -1
  12. package/dist-lib/agent-events.cjs +1 -1
  13. package/dist-lib/attached-projects.cjs +1 -1
  14. package/dist-lib/auth/shared-session.cjs +1 -1
  15. package/dist-lib/backend-origin.cjs +1 -1
  16. package/dist-lib/beta.cjs +1 -1
  17. package/dist-lib/beta.mjs +1 -1
  18. package/dist-lib/bridge-constants.cjs +1 -1
  19. package/dist-lib/bridge-contract-input.cjs +1 -1
  20. package/dist-lib/bridge-contract-input.mjs +1 -1
  21. package/dist-lib/bridge-contract.cjs +1 -1
  22. package/dist-lib/bridge-contract.mjs +1 -1
  23. package/dist-lib/bundle-channel.cjs +3299 -1665
  24. package/dist-lib/capture-contract.cjs +1 -1
  25. package/dist-lib/capture-contract.mjs +1 -1
  26. package/dist-lib/cloud-contract.cjs +1 -1
  27. package/dist-lib/cloud-contract.mjs +1 -1
  28. package/dist-lib/cloud-test-args.cjs +1 -1
  29. package/dist-lib/cloud-test-args.mjs +1 -1
  30. package/dist-lib/cloud.cjs +1 -1
  31. package/dist-lib/cloud.mjs +1 -1
  32. package/dist-lib/config.cjs +1 -1
  33. package/dist-lib/config.mjs +1 -1
  34. package/dist-lib/detox/index.cjs +43 -8
  35. package/dist-lib/detox/jest-environment.cjs +14 -0
  36. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  37. package/dist-lib/expo-swift-bundle.cjs +2432 -1128
  38. package/dist-lib/expo-swift-metadata.cjs +1 -1
  39. package/dist-lib/expo-swift-metadata.mjs +1 -1
  40. package/dist-lib/home-paths.cjs +1 -1
  41. package/dist-lib/host/bridge-host.cjs +2908 -1601
  42. package/dist-lib/host/fetch-proxy-handler.cjs +22 -6
  43. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  44. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  45. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  46. package/dist-lib/host/websocket-proxy.cjs +1 -1
  47. package/dist-lib/index.cjs +1941 -742
  48. package/dist-lib/jump-to-source-babel.cjs +1 -1
  49. package/dist-lib/jump-to-source-native.cjs +1 -1
  50. package/dist-lib/kotlin-host.cjs +1 -1
  51. package/dist-lib/menu.cjs +1 -1
  52. package/dist-lib/menu.mjs +1 -1
  53. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  54. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  55. package/dist-lib/metro-production-bundle.cjs +1 -1
  56. package/dist-lib/metro-production-bundle.mjs +1 -1
  57. package/dist-lib/metro.cjs +6215 -4283
  58. package/dist-lib/native-app-identity-project.cjs +31 -6
  59. package/dist-lib/native-app-identity-project.mjs +31 -6
  60. package/dist-lib/native-app-identity.cjs +1 -1
  61. package/dist-lib/native-app-identity.mjs +1 -1
  62. package/dist-lib/native-firebase-metadata.cjs +1 -1
  63. package/dist-lib/native-firebase-metadata.mjs +1 -1
  64. package/dist-lib/plist.cjs +1 -1
  65. package/dist-lib/plist.mjs +1 -1
  66. package/dist-lib/profiles.cjs +1 -1
  67. package/dist-lib/public-brand.cjs +1 -1
  68. package/dist-lib/public-origins-lib-esm.json +24 -23
  69. package/dist-lib/public-origins-lib-static.json +1 -1
  70. package/dist-lib/public-origins-lib.json +134 -78
  71. package/dist-lib/react-native-host-modules.cjs +1 -1
  72. package/dist-lib/react-native-host-modules.mjs +1 -1
  73. package/dist-lib/reap-browser.cjs +2 -2
  74. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  75. package/dist-lib/sdk.cjs +39 -5
  76. package/dist-lib/sdk.mjs +39 -5
  77. package/dist-lib/skills.cjs +3637 -2168
  78. package/dist-lib/swift-compile.cjs +496 -352
  79. package/dist-lib/swift-compile.mjs +494 -350
  80. package/dist-lib/swift-package.cjs +58 -9
  81. package/dist-lib/swift-package.mjs +57 -9
  82. package/dist-lib/swift-submit.cjs +1 -1
  83. package/dist-lib/swift-submit.mjs +1 -1
  84. package/dist-lib/swift-toolchain.cjs +26 -11
  85. package/dist-lib/swift.cjs +1 -1
  86. package/dist-lib/vite-swift.cjs +2443 -1134
  87. package/dist-lib/vite.cjs +1907 -763
  88. package/dist-lib/worklet-executable.cjs +1 -1
  89. package/dist-lib/worklet-executable.mjs +1 -1
  90. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
  91. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +9 -1
  92. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  93. package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
  94. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -1
  95. package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
  96. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +2 -0
  97. package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +10 -1
  98. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  99. package/package.json +1 -1
  100. package/runtime-companion.json +1 -1
  101. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +69 -2
  102. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +44 -4
  103. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
  104. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
  105. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
  106. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
  107. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
  108. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
  109. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
  110. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
  111. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
  112. package/sdk/ios/usr/include/_ctype.h +388 -0
  113. package/sdk/ios/usr/include/_inttypes.h +296 -0
  114. package/sdk/ios/usr/include/_locale.h +83 -0
  115. package/sdk/ios/usr/include/_locale_posix2008.h +65 -0
  116. package/sdk/ios/usr/include/_time.h +207 -0
  117. package/sdk/ios/usr/include/arm/param.h +151 -0
  118. package/sdk/ios/usr/include/ctype.h +70 -0
  119. package/sdk/ios/usr/include/dispatch/dispatch.h +72 -6
  120. package/sdk/ios/usr/include/dlfcn.h +1 -2
  121. package/sdk/ios/usr/include/inttypes.h +35 -0
  122. package/sdk/ios/usr/include/locale.h +59 -0
  123. package/sdk/ios/usr/include/machine/param.h +42 -0
  124. package/sdk/ios/usr/include/net/if.h +1 -2
  125. package/sdk/ios/usr/include/peach/pthread.h +4 -4
  126. package/sdk/ios/usr/include/pthread/qos.h +304 -0
  127. package/sdk/ios/usr/include/runetype.h +118 -0
  128. package/sdk/ios/usr/include/setjmp.h +99 -0
  129. package/sdk/ios/usr/include/sys/_types/_clock_t.h +32 -0
  130. package/sdk/ios/usr/include/sys/_types/_ct_rune_t.h +33 -0
  131. package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
  132. package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
  133. package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
  134. package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
  135. package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
  136. package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
  137. package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
  138. package/sdk/ios/usr/include/sys/_types/_rune_t.h +32 -0
  139. package/sdk/ios/usr/include/sys/_types/_time_t.h +32 -0
  140. package/sdk/ios/usr/include/sys/_types/_wint_t.h +33 -0
  141. package/sdk/ios/usr/include/sys/cdefs.h +5 -0
  142. package/sdk/ios/usr/include/sys/param.h +235 -0
  143. package/sdk/ios/usr/include/sys/proc.h +1 -0
  144. package/sdk/ios/usr/include/sys/qos.h +151 -12
  145. package/sdk/ios/usr/include/time.h +67 -2
  146. package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
  147. package/sdk/ios/wasm/include/fcntl.h +11 -0
  148. package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
  149. package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
  150. package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
  151. package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
  152. package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
  153. package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
  154. package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
  155. package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
  156. package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
  157. package/sdk/ios/wasm/include/machine/_types.h +153 -0
  158. package/sdk/ios/wasm/include/machine/endian.h +2 -0
  159. package/sdk/ios/wasm/include/machine/limits.h +2 -0
  160. package/sdk/ios/wasm/include/machine/types.h +30 -0
  161. package/sdk/ios/wasm/include/poll.h +8 -0
  162. package/sdk/ios/wasm/include/pthread.h +50 -0
  163. package/sdk/ios/wasm/include/signal.h +72 -0
  164. package/sdk/ios/wasm/include/stdlib.h +3 -0
  165. package/sdk/ios/wasm/include/string.h +10 -0
  166. package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
  167. package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
  168. package/sdk/ios/wasm/include/sys/mman.h +122 -0
  169. package/sdk/ios/wasm/include/sys/select.h +37 -0
  170. package/sdk/ios/wasm/include/sys/signal.h +259 -0
  171. package/sdk/ios/wasm/include/sys/socket.h +8 -0
  172. package/sdk/ios/wasm/include/sys/types.h +14 -0
  173. package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
  174. package/sdk/ios/wasm/include/sys/uio.h +11 -0
  175. package/sdk/ios/wasm/include/sys/wait.h +89 -0
  176. package/sdk/ios/wasm/include/time.h +8 -0
  177. package/sdk/ios/wasm/include/unistd.h +17 -0
  178. package/src/bridge-contract.ts +2 -0
  179. package/src/chromium-admission.ts +10 -5
  180. package/src/device-catalog.ts +4 -4
  181. package/src/host/fetch-proxy-handler.ts +20 -0
  182. package/src/host/rolldown-bundle-forward.ts +4 -1
  183. package/src/metro-plugin.ts +5 -2
  184. package/src/nitro-adapter.lock.json +6 -6
  185. package/src/nitro-compile.ts +63 -2
  186. package/src/numbered-lock.ts +72 -0
  187. package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
  188. package/src/react-native-coverage/capability-source-references.ts +50 -13
  189. package/src/react-native-coverage/native-source-credit.ts +126 -0
  190. package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
  191. package/src/react-native-coverage/native-surface.ts +49 -0
  192. package/src/react-native-coverage/verified-reach.ts +22 -2
  193. package/src/runtime-assets.ts +17 -0
  194. package/src/swift-compile.ts +84 -47
  195. package/src/swift-coverage/indexing.ts +17 -1
  196. package/src/swift-coverage/sdk.ts +71 -0
  197. package/src/swift-coverage/source.ts +74 -2
  198. package/src/swift-coverage/types.ts +6 -0
  199. package/src/swift-distribution.lock.json +12 -12
  200. package/src/swift-host.ts +133 -14
  201. package/src/swift-objc-compile.ts +11 -22
  202. package/src/swift-objc-metadata.ts +2 -8
  203. package/src/swift-objc-platform.ts +53 -0
  204. package/src/swift-objc-standin.ts +49 -0
  205. package/src/swift-package-manifest.ts +48 -3
  206. package/src/swift-package.ts +85 -12
  207. package/src/swift-packages.ts +157 -44
  208. package/src/swift-source-pods.ts +288 -0
  209. package/src/swift-standins.ts +4 -1
  210. package/src/swift-toolchain.ts +32 -10
  211. package/src/vite-plugin-one.ts +5 -4
  212. package/src/worker-system-chunks.ts +7 -1
  213. package/src/xcode-project.ts +40 -11
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1673 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1684 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1673 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1684 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -76,7 +76,7 @@ export interface CanvasKitSwiftImageExports {
76
76
  _peach_imagesource_frame(source: number, index: number): number;
77
77
  _peach_imagesource_release(source: number): void;
78
78
  _peach_bitmap_composite(target: number, source: number, width: number, height: number, row: number, mode: number, info: number, flags: number, spans: number, spanCount: number, mask: number): number;
79
- _peach_bitmap_coverage(commands: number, count: number, width: number, height: number, flatness: number, evenOdd: number): number;
79
+ _peach_bitmap_coverage(commands: number, count: number, width: number, height: number, flatness: number, evenOdd: number, imageQuad: number): number;
80
80
  _peach_bitmap_thin_stroke(commands: number, count: number, width: number, height: number, lineWidth: number, flatness: number): number;
81
81
  _peach_bitmap_clip(commands: number, count: number, width: number, height: number, flatness: number, rule: number, mask: number, combine: number): number;
82
82
  _peach_bitmap_fill(target: number, width: number, height: number, row: number, color: number, spans: number, spanCount: number): number;
@@ -4,6 +4,11 @@ export type ClipboardSyncOperation = {
4
4
  type: 'read';
5
5
  } | {
6
6
  type: 'presence';
7
+ } | {
8
+ type: 'read-url';
9
+ } | {
10
+ type: 'write-url';
11
+ url: string | null;
7
12
  } | {
8
13
  type: 'write';
9
14
  text: string | null;
@@ -11,6 +16,9 @@ export type ClipboardSyncOperation = {
11
16
  export type ClipboardSyncResponse = {
12
17
  ok: true;
13
18
  text: string | null;
19
+ } | {
20
+ ok: true;
21
+ url: string | null;
14
22
  } | {
15
23
  ok: true;
16
24
  presence: SootSimClipboardPresence;
@@ -20,5 +28,5 @@ export type ClipboardSyncResponse = {
20
28
  };
21
29
  export declare function createClipboardSyncReply(): SharedArrayBuffer;
22
30
  export declare function completeClipboardSyncReply(reply: SyncReplyBuffer, response: ClipboardSyncResponse): void;
23
- export declare function decodeClipboardSyncResponse(response: unknown): string | null;
31
+ export declare function decodeClipboardSyncResponse(response: unknown, field?: 'text' | 'url'): string | null;
24
32
  export declare function decodeClipboardPresenceResponse(response: unknown): SootSimClipboardPresence;
@@ -26,6 +26,7 @@ export declare function adaptiveForegroundGlassAncestor<T extends {
26
26
  export declare function subtreeSamplesLiveBackdrop(node: PaintBoundaryNode): boolean;
27
27
  export declare function subtreeReadsLayerBackdrop(node: PaintBoundaryNode): boolean;
28
28
  export declare function subtreeContainsTextInputHost(node: PaintBoundaryNode): boolean;
29
+ export declare function subtreeContainsMetalEffect(node: PaintBoundaryNode): boolean;
29
30
  export declare function subtreeContainsLivePresentation(node: PaintBoundaryNode): boolean;
30
31
  export declare function invalidateTextPresentationBoundary(node: PaintBoundaryNode): void;
31
32
  export declare function invalidateSubtreeLivePresentationCache(node: PaintBoundaryNode): void;
@@ -1,7 +1,7 @@
1
- import type { RemotePeerIdentity } from '../remote-stream/cloud-display.d.ts';
2
- import type { PreviewBundleStripDescriptor } from './bundle-variantContract.d.ts';
1
+ import { type PreviewCaptureKind } from '../../../peach-globals/src/index.d.ts';
2
+ import { type RemotePeerIdentity } from '../remote-stream/cloud-display.d.ts';
3
+ import { type PreviewBundleStripDescriptor } from './bundle-variantContract.d.ts';
3
4
  import type { TraceFrameStats } from './trace.d.ts';
4
- import type { PreviewCaptureKind } from '../../../peach-globals/src/index.d.ts';
5
5
  export type PreviewUploadShareKind = 'flow' | 'build';
6
6
  export type PreviewUploadDeviceSpec = {
7
7
  model?: string;
@@ -108,6 +108,14 @@ export type PreviewUploadInitRequest = {
108
108
  pullRequestNumber?: number;
109
109
  pullRequestTitle?: string;
110
110
  };
111
+ export type PreviewUploadInitParseResult = {
112
+ ok: true;
113
+ value: PreviewUploadInitRequest;
114
+ } | {
115
+ ok: false;
116
+ path: string;
117
+ };
118
+ export declare function parsePreviewUploadInitRequest(value: unknown): PreviewUploadInitParseResult;
111
119
  export type PreviewUploadPresignedSlot = {
112
120
  putUrl: string;
113
121
  objectKey: string;
@@ -88,7 +88,7 @@ export declare function releasableMultipartPrefix(payload: string, contentType:
88
88
  length: number;
89
89
  bundleStarted: boolean;
90
90
  };
91
- export declare function multipartFailurePart(contentType: string, message: string): string;
91
+ export declare function multipartFailurePart(contentType: string, message: string, sentPrefix: string): string;
92
92
  export declare function attachRolldownBundleHttpPayload(payload: string, contentType: string | undefined): Promise<string>;
93
93
  export declare function readRolldownBundleInventory(source: string): Promise<RolldownBundleInventory>;
94
94
  export {};
@@ -15,6 +15,11 @@ export type WebViewLoadResult = {
15
15
  } | {
16
16
  kind: 'restrictedPort';
17
17
  };
18
+ export declare function webViewNetworkError(kind: 'refused' | 'restrictedPort'): {
19
+ domain: string;
20
+ code: number;
21
+ description: string;
22
+ };
18
23
  export type WebViewLoadObservation = {
19
24
  frameName: string;
20
25
  instanceId: string;
@@ -115,6 +120,7 @@ export type WebViewAutomationHelpers = {
115
120
  evaluationScripts: typeof webViewEvaluationScripts;
116
121
  isAppScheme: typeof isAppSchemeUrl;
117
122
  isSameDocument: typeof isSameDocumentRequest;
123
+ networkError: typeof webViewNetworkError;
118
124
  redirectRequestHeaders: typeof redirectRequestHeaders;
119
125
  };
120
126
  export declare const webViewAutomationHelpers: WebViewAutomationHelpers;
@@ -29,6 +29,8 @@ export interface SootSimClipboardBridge {
29
29
  readPresence(): Promise<SootSimClipboardPresence>;
30
30
  readItems(): Promise<SootSimClipboardSnapshot>;
31
31
  writeItems(items: SootSimClipboardItems): Promise<void>;
32
+ readURLSync(): string | null;
33
+ writeURLSync(url: string | null): void;
32
34
  readStringSync(): string | null;
33
35
  writeStringSync(text: string | null): void;
34
36
  readText(): Promise<string>;
@@ -16,10 +16,19 @@ export interface SootSimAuxCompositorStats {
16
16
  browserCompositeFrames: number;
17
17
  shellScene: SootSimShellSceneFanoutStats | null;
18
18
  }
19
+ export type SootSimLiveCompositeFreshStage = 'readHeadlessFrames' | 'forceRenderAll' | 'paintNow';
20
+ export interface SootSimLiveCompositePublicationStatus {
21
+ holds: number;
22
+ subscribers: number;
23
+ painting: boolean;
24
+ paintsStarted: number;
25
+ paintsDrawn: number;
26
+ }
19
27
  export interface SootSimLiveCompositeBridge {
20
28
  getCanvas(): HTMLCanvasElement | null;
21
29
  getFrameToken(): number;
22
- captureFresh(): Promise<{
30
+ getPublicationStatus(): SootSimLiveCompositePublicationStatus;
31
+ captureFresh(onStage?: (stage: SootSimLiveCompositeFreshStage) => void): Promise<{
23
32
  canvas: HTMLCanvasElement | null;
24
33
  frameToken: number;
25
34
  }>;
@@ -33,7 +33,7 @@ export type { SootSimWindowScaleBridge } from './windowBridgeContract.d.ts';
33
33
  export type { SootSimElectronBridge } from './electronBridgeContract.d.ts';
34
34
  export { isBoxViewingMessage } from './shellBridgeContract.d.ts';
35
35
  export type { PeachHomeApp, PeachHomeStorageValue, PeachHomeStorageBinding, PeachHomeScreenConfig, SootSimConsoleBuffer, SootSimShellCommands, SootSimMainShellBridge, SootSimDemoShareLeaseOptions, SootSimDemoShareBridge, BoxViewingMode, BoxViewingMessage, } from './shellBridgeContract.d.ts';
36
- export type { SootSimRenderActivityState, SootSimShellSceneFanoutStats, SootSimAuxCompositorStats, SootSimLiveCompositeBridge, } from './compositorBridgeContract.d.ts';
36
+ export type { SootSimRenderActivityState, SootSimShellSceneFanoutStats, SootSimAuxCompositorStats, SootSimLiveCompositeBridge, SootSimLiveCompositeFreshStage, SootSimLiveCompositePublicationStatus, } from './compositorBridgeContract.d.ts';
37
37
  export type { PeachAnimatedExecution, PeachLockstepTenantFrame, SootSimLockstepFrameReceipt, LockstepInputReceipt, LockstepScheduledInput, SootSimLockstepCaptureController, SootSimLockstepCaptureBridge, } from './lockstepCaptureBridgeContract.d.ts';
38
38
  export type { PointerDeliveryTarget, PointerDeliveryPendingDrop, PointerDeliveryStats, SootSimShellHostBridge, } from './shellHostBridgeContract.d.ts';
39
39
  export type { SootSimLaunchArguments, SootSimExternalAppLifecycleOptions, SootSimStorageResetStrategy, SootSimExternalAppResetOptions, SootSimExternalAppResetResult, SootSimHotRemountBridge, } from './appLifecycleBridgeContract.d.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1673",
3
+ "version": "0.1.1684",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"64b30b73101e38ea8d4aaa3e07f22bdedd2736a7d1f0f21f9229f2f4daf45756","file":"node/cli-64b30b73101e38ea8d4aaa3e07f22bdedd2736a7d1f0f21f9229f2f4daf45756.cjs"}
1
+ {"abi":1,"sha256":"0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630","file":"node/cli-0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630.cjs"}
@@ -6,11 +6,29 @@
6
6
  #define __null_unspecified _Null_unspecified
7
7
  #endif
8
8
  #if !defined(CF_EXCLUDE_CSTD_HEADERS)
9
+ #include <sys/types.h>
10
+ #include <stdarg.h>
11
+ #include <assert.h>
12
+ #include <ctype.h>
9
13
  #include <errno.h>
14
+ #include <float.h>
15
+ #include <limits.h>
16
+ #include <locale.h>
10
17
  #include <math.h>
18
+ #include <setjmp.h>
11
19
  #include <signal.h>
20
+ #include <stddef.h>
21
+ #include <stdio.h>
12
22
  #include <stdlib.h>
13
23
  #include <string.h>
24
+ #include <time.h>
25
+ #if defined(__STDC_VERSION__) && (199901L <= __STDC_VERSION__)
26
+ #include <inttypes.h>
27
+ #include <stdint.h>
28
+ #endif
29
+ #if defined(__STDC_VERSION__) && (199901L <= __STDC_VERSION__) && (__STDC_VERSION__ <= 201710L)
30
+ #include <stdbool.h>
31
+ #endif
14
32
  #endif
15
33
  #include <MacTypes.h>
16
34
  #include <TargetConditionals.h>
@@ -31,8 +49,9 @@
31
49
  #endif
32
50
  #endif
33
51
  typedef unsigned char Boolean;
34
- typedef unsigned int UInt32;
52
+ typedef unsigned char UInt8;
35
53
  typedef int32_t SInt32;
54
+ typedef unsigned int UInt32;
36
55
  typedef SInt32 OSStatus;
37
56
  typedef unsigned long CFOptionFlags;
38
57
  typedef signed long CFIndex;
@@ -108,7 +127,56 @@ typedef CF_ENUM(CFIndex, CFPropertyListFormat) {
108
127
  };
109
128
  CFUUIDRef CFUUIDCreate(CFAllocatorRef alloc);
110
129
  CFStringRef CFUUIDCreateString(CFAllocatorRef alloc, CFUUIDRef uuid);
130
+ typedef struct {
131
+ UInt8 byte0;
132
+ UInt8 byte1;
133
+ UInt8 byte2;
134
+ UInt8 byte3;
135
+ UInt8 byte4;
136
+ UInt8 byte5;
137
+ UInt8 byte6;
138
+ UInt8 byte7;
139
+ UInt8 byte8;
140
+ UInt8 byte9;
141
+ UInt8 byte10;
142
+ UInt8 byte11;
143
+ UInt8 byte12;
144
+ UInt8 byte13;
145
+ UInt8 byte14;
146
+ UInt8 byte15;
147
+ } CFUUIDBytes;
148
+ extern CFUUIDRef CFUUIDCreateFromUUIDBytes(CFAllocatorRef alloc, CFUUIDBytes bytes);
111
149
  CFStringRef CFErrorCopyDescription(CFErrorRef err) __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
150
+ typedef UInt32 CFStringEncoding;
151
+ typedef CF_ENUM(CFStringEncoding, CFStringBuiltInEncodings) {
152
+ kCFStringEncodingMacRoman = 0,
153
+ kCFStringEncodingWindowsLatin1 = 0x0500,
154
+ kCFStringEncodingISOLatin1 = 0x0201,
155
+ kCFStringEncodingNextStepLatin = 0x0B01,
156
+ kCFStringEncodingASCII = 0x0600,
157
+ kCFStringEncodingUnicode = 0x0100,
158
+ kCFStringEncodingUTF8 = 0x08000100,
159
+ kCFStringEncodingNonLossyASCII = 0x0BFF,
160
+
161
+ kCFStringEncodingUTF16 = 0x0100,
162
+ kCFStringEncodingUTF16BE = 0x10000100,
163
+ kCFStringEncodingUTF16LE = 0x14000100,
164
+
165
+ kCFStringEncodingUTF32 = 0x0c000100,
166
+ kCFStringEncodingUTF32BE = 0x18000100,
167
+ kCFStringEncodingUTF32LE = 0x1c000100
168
+ };
169
+ #if defined(__GNUC__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) && defined(__APPLE_CC__) && (__APPLE_CC__ > 1) && !defined(__INTEL_COMPILER) && TARGET_OS_MAC
170
+ #define CF_FORMAT_FUNCTION(F,A) __attribute__((format(CFString, F, A)))
171
+ #define CF_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
172
+ #else
173
+ #define CF_FORMAT_FUNCTION(F,A)
174
+ #define CF_FORMAT_ARGUMENT(A)
175
+ #endif
176
+ extern CFStringRef CFStringCreateWithFormatAndArguments(CFAllocatorRef alloc, CFDictionaryRef formatOptions, CFStringRef format, va_list arguments) CF_FORMAT_FUNCTION(3,0);
177
+ extern CFStringRef CFStringCreateWithCString(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding) CF_FORMAT_ARGUMENT(2);
178
+ extern CFIndex CFStringGetLength(CFStringRef theString);
179
+ extern Boolean CFStringGetCString(CFStringRef theString, char *buffer, CFIndex bufferSize, CFStringEncoding encoding);
112
180
  #pragma clang arc_cf_code_audited end
113
181
  #ifdef __cplusplus
114
182
  }
@@ -214,7 +282,6 @@ extern CFNumberType CFNumberGetType(CFNumberRef number);
214
282
  }
215
283
  #endif
216
284
  extern CFComparisonResult CFStringCompare(CFStringRef theString1, CFStringRef theString2, CFStringCompareFlags compareOptions);
217
- typedef unsigned char UInt8;
218
285
  extern CFStringRef __CFStringMakeConstantString(const char *cStr);
219
286
  #define CFSTR(cStr) __CFStringMakeConstantString("" cStr "")
220
287
  extern CFStringRef CFCopyDescription(CFTypeRef cf);
@@ -11,6 +11,7 @@
11
11
  #include <limits.h>
12
12
  #include <assert.h>
13
13
  #include <unistd.h>
14
+ #include <uuid/uuid.h>
14
15
  #include <TargetConditionals.h>
15
16
  #import <objc/NSObject.h>
16
17
  #import <dispatch/dispatch.h>
@@ -83,9 +84,28 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
83
84
  #define NS_ENUM(...) CF_ENUM(__VA_ARGS__)
84
85
  #define NS_CLOSED_ENUM(_type, _name) CF_CLOSED_ENUM(_type, _name)
85
86
  #define NS_OPTIONS(_type, _name) CF_OPTIONS(_type, _name)
86
- #define __PEACH_NAMED_ERROR_ENUM(_domain, _name) enum _name : NSInteger _name; enum __attribute__((ns_error_domain(_domain))) _name : NSInteger
87
- #define __PEACH_ANON_ERROR_ENUM(_domain) enum __attribute__((ns_error_domain(_domain))) : NSInteger
88
- #define NS_ERROR_ENUM(...) __PEACH_ENUM_GET(__VA_ARGS__, __PEACH_NAMED_ERROR_ENUM, __PEACH_ANON_ERROR_ENUM, )(__VA_ARGS__)
87
+ #define __NS_ERROR_ENUM_GET_MACRO(_1, _2, NAME, ...) NAME
88
+ #if ((__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum))) && __has_attribute(ns_error_domain)
89
+ #define __NS_NAMED_ERROR_ENUM(_domain, _name) enum _name : NSInteger _name; enum __attribute__((ns_error_domain(_domain))) _name : NSInteger
90
+ #define __NS_ANON_ERROR_ENUM(_domain) enum __attribute__((ns_error_domain(_domain))) : NSInteger
91
+ #else
92
+ #define __NS_NAMED_ERROR_ENUM(_domain, _name) NS_ENUM(NSInteger, _name)
93
+ #define __NS_ANON_ERROR_ENUM(_domain) NS_ENUM(NSInteger)
94
+ #endif
95
+
96
+ /* NS_ERROR_ENUM supports the use of one or two arguments. The first argument is always the domain specifier for the enum. The second argument is an optional name of the typedef for the macro. When specifying a name for of the typedef, you must precede the macro with 'typedef' like so:
97
+
98
+ typedef NS_ERROR_ENUM(MyErrorDomain, SomeErrorCodes) {
99
+ ...
100
+ };
101
+
102
+ If you do not specify a typedef name, do not use 'typedef', like so:
103
+
104
+ NS_ERROR_ENUM(MyErrorDomain) {
105
+ ...
106
+ };
107
+ */
108
+ #define NS_ERROR_ENUM(...) __NS_ERROR_ENUM_GET_MACRO(__VA_ARGS__, __NS_NAMED_ERROR_ENUM, __NS_ANON_ERROR_ENUM)(__VA_ARGS__)
89
109
  #define NS_ENUM_AVAILABLE(...)
90
110
  #define NS_ENUM_AVAILABLE_IOS(...)
91
111
  #define NS_ENUM_DEPRECATED_IOS(...)
@@ -207,7 +227,7 @@ NS_INLINE NSRange NSMakeRange(NSUInteger loc, NSUInteger len) {
207
227
  r.length = len;
208
228
  return r;
209
229
  }
210
- typedef NS_ENUM(NSInteger, NSComparisonResult) { NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending } NS_SWIFT_NAME(ComparisonResult);
230
+ typedef NS_CLOSED_ENUM(NSInteger, NSComparisonResult) { NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending } NS_SWIFT_NAME(ComparisonResult);
211
231
  typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
212
232
  typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions) { NSEnumerationConcurrent = (1UL << 0), NSEnumerationReverse = (1UL << 1) };
213
233
  typedef NS_OPTIONS(NSUInteger, NSStringCompareOptions) {
@@ -306,6 +326,7 @@ __attribute__((swift_bridge("Swift.String")))
306
326
  - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask;
307
327
  @property (readonly) float floatValue;
308
328
  - (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
329
+ - (NSString *)substringFromIndex:(NSUInteger)from;
309
330
  - (NSString *)substringWithRange:(NSRange)range;
310
331
  - (NSRange)rangeOfComposedCharacterSequencesForRange:(NSRange)range __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
311
332
  @end
@@ -362,6 +383,7 @@ __attribute__((swift_bridge("Swift.Array")))
362
383
  - (void)enumerateObjectsUsingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
363
384
  @end
364
385
  @interface NSMutableArray<ObjectType> : NSArray<ObjectType>
386
+ - (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx __attribute__((availability(macos,introduced=10.8), availability(ios,introduced=6.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
365
387
  - (void)removeObjectIdenticalTo:(ObjectType)anObject;
366
388
  - (void)removeObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
367
389
  + (instancetype)arrayWithCapacity:(NSUInteger)numItems;
@@ -554,6 +576,7 @@ __attribute__((swift_bridge("Data")))
554
576
  - (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
555
577
  @property (readonly) void *mutableBytes NS_RETURNS_INNER_POINTER;
556
578
  @property NSUInteger length;
579
+ + (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems;
557
580
  + (nullable instancetype)dataWithLength:(NSUInteger)length;
558
581
  @end
559
582
  @interface NSMutableData (NSExtendedMutableData)
@@ -770,6 +793,8 @@ typedef struct __attribute__((objc_bridge(id))) __SecTrust *SecTrustRef;
770
793
  @end
771
794
  __attribute__((swift_bridge("UUID")))
772
795
  @interface NSUUID : NSObject <NSCopying, NSSecureCoding>
796
+ + (instancetype)UUID;
797
+ - (void)getUUIDBytes:(uuid_t _Nonnull)uuid;
773
798
  @property (readonly, copy) NSString *UUIDString;
774
799
  @end
775
800
  __attribute__((swift_bridge("IndexPath")))
@@ -804,6 +829,8 @@ __attribute__((swift_bridge("Locale")))
804
829
  @end
805
830
  __attribute__((swift_bridge("TimeZone")))
806
831
  @interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
832
+ @property (class, readonly, copy) NSTimeZone *localTimeZone;
833
+ @property (nullable, readonly, copy) NSString *abbreviation;
807
834
  + (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
808
835
  @end
809
836
  __attribute__((swift_bridge("Calendar")))
@@ -818,6 +845,7 @@ __attribute__((swift_bridge("Notification")))
818
845
  NS_SWIFT_NAME(NotificationCenter)
819
846
  @interface NSNotificationCenter : NSObject
820
847
  - (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject;
848
+ - (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo;
821
849
  - (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable id)anObject;
822
850
  - (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable id)anObject;
823
851
  @property (class, readonly, strong) NSNotificationCenter *defaultCenter;
@@ -833,6 +861,8 @@ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSize;
833
861
  FOUNDATION_EXPORT NSFileAttributeKey const NSFileCreationDate;
834
862
  FOUNDATION_EXPORT NSFileAttributeKey const NSFileModificationDate;
835
863
  FOUNDATION_EXPORT NSFileAttributeKey const NSFileProtectionKey __attribute__((availability(ios,introduced=4.0)));
864
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemSize;
865
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFreeSize;
836
866
  typedef NSString *NSFileProtectionType NS_TYPED_ENUM;
837
867
  FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionNone __attribute__((availability(ios,introduced=4.0)));
838
868
  FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionComplete __attribute__((availability(ios,introduced=4.0)));
@@ -900,6 +930,12 @@ NS_SWIFT_NAME(Bundle)
900
930
  @interface NSBundle : NSObject
901
931
  - (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext;
902
932
  - (nullable id)objectForInfoDictionaryKey:(NSString *)key;
933
+ #if defined(__swift__)
934
+ @property (nullable, readonly, copy) NSURL *appStoreReceiptURL __attribute__((availability(macos,introduced=10.7,deprecated=15.0,message="Use AppTransaction.shared and Transaction.all from StoreKit.framework instead"), availability(ios,introduced=7.0,deprecated=18.0,message="Use AppTransaction.shared and Transaction.all from StoreKit.framework instead"), availability(watchos,introduced=2.0,deprecated=11.0,message="Use AppTransaction.shared and Transaction.all from StoreKit.framework instead"), availability(tvos,introduced=9.0,deprecated=18.0,message="Use AppTransaction.shared and Transaction.all from StoreKit.framework instead")));
935
+ #else
936
+ @property (nullable, readonly, copy) NSURL *appStoreReceiptURL __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
937
+ #endif
938
+ @property (readonly, copy) NSString *bundlePath;
903
939
  @property (nullable, readonly, copy) NSString *executablePath;
904
940
  @property (nullable, readonly, copy) NSDictionary<NSString *, id> *infoDictionary;
905
941
  @property (class, readonly, strong) NSBundle *mainBundle;
@@ -960,6 +996,7 @@ NS_SWIFT_NAME(Thread)
960
996
  @property (nullable, copy) NSString *name __attribute__((availability(ios,introduced=2.0)));
961
997
  - (instancetype)initWithTarget:(id)target selector:(SEL)selector object:(nullable id)argument __attribute__((availability(ios,introduced=2.0)));
962
998
  - (void)start __attribute__((availability(ios,introduced=2.0)));
999
+ @property (readonly, getter=isCancelled) BOOL cancelled __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
963
1000
  - (void)cancel __attribute__((availability(ios,introduced=2.0)));
964
1001
  + (void)sleepForTimeInterval:(NSTimeInterval)ti NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use Task.sleep(until:clock:) instead.");
965
1002
  @property (readonly) BOOL isMainThread __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
@@ -1011,6 +1048,7 @@ typedef NS_OPTIONS(NSUInteger, NSSearchPathDomainMask) {
1011
1048
  NSSystemDomainMask = 8,
1012
1049
  NSAllDomainsMask = 0x0ffff
1013
1050
  };
1051
+ FOUNDATION_EXPORT NSString *NSHomeDirectory(void);
1014
1052
  FOUNDATION_EXPORT NSArray<NSString *> *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde);
1015
1053
  NS_SWIFT_NAME(FileManager)
1016
1054
  typedef NS_OPTIONS(NSUInteger, NSDirectoryEnumerationOptions) {
@@ -1074,6 +1112,7 @@ typedef NS_ENUM(NSUInteger, NSKeyValueChange) {
1074
1112
  - (nullable NSArray<NSString *> *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1075
1113
  - (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error;
1076
1114
  - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error;
1115
+ - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1077
1116
  - (BOOL)fileExistsAtPath:(NSString *)path;
1078
1117
  - (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1079
1118
  - (nullable NSData *)contentsAtPath:(NSString *)path;
@@ -1099,6 +1138,7 @@ NS_SWIFT_NAME(ProcessInfo)
1099
1138
  @property (readonly) unsigned long long physicalMemory __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1100
1139
  @property (class, readonly, strong) NSProcessInfo *processInfo;
1101
1140
  @property (copy) NSString *processName;
1141
+ @property (readonly) int processIdentifier;
1102
1142
  @property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
1103
1143
  @property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
1104
1144
  @end
@@ -0,0 +1,29 @@
1
+ //
2
+ // MFComposeAssistantViewController.h
3
+ // MessageUI
4
+ //
5
+ // Copyright © 2025 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <MessageUI/MFMailDraft.h>
9
+
10
+ #import <Foundation/Foundation.h>
11
+ #import <UIKit/UIKit.h>
12
+
13
+ @class MFComposeAssistantViewController;
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ @protocol MFComposeAssistantViewControllerDelegate <NSObject>
18
+
19
+ - (void)composeAssistantViewController:(MFComposeAssistantViewController *)controller didComposeDraft:(MFMailDraft *)draft;
20
+
21
+ @end
22
+
23
+ @interface MFComposeAssistantViewController: UIViewController
24
+
25
+ - (instancetype)initWithDelegate:(id<MFComposeAssistantViewControllerDelegate>)delegate;
26
+
27
+ @end
28
+
29
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,14 @@
1
+ //
2
+ // MFMailComposeControllerDeferredAction.h
3
+ // MessageUI
4
+ //
5
+ // Copyright © 2023 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ typedef NS_ENUM(NSInteger, MFMailComposeControllerDeferredAction) {
11
+ MFMailComposeControllerDeferredActionNone,
12
+ MFMailComposeControllerDeferredActionAdjustInsertionPoint,
13
+ MFMailComposeControllerDeferredActionAddMissingRecipients,
14
+ };
@@ -0,0 +1,162 @@
1
+ /// @header MFMailComposeViewController
2
+ /// @abstract The MFMailComposeViewController class provides an interface for editing and sending email.
3
+ /// @discussion MFMailComposeViewController is used for implementing a simple interface for users to enter
4
+ /// and send email.
5
+ /// @copyright Copyright 2008-2016 Apple Inc. All rights reserved.
6
+ #import <UIKit/UIKit.h>
7
+
8
+ NS_ASSUME_NONNULL_BEGIN
9
+
10
+
11
+ /// @enum MFMailComposeResult
12
+ /// @abstract Composition result sent to the delegate upon user completion.
13
+ /// @discussion This result will inform of the user's choice in regards to email composition. If the user
14
+ /// cancels the composition, <tt>MFMailComposeResultCancelled</tt> will be sent to the delegate.
15
+ /// Typically <tt>MFMailComposeResultSent</tt> or <tt>MFMailComposeResultSaved</tt> will
16
+ /// be sent, but <tt>MFMailComposeResultFailed</tt> will be sent in the case of failure.
17
+ /// </p>Send may only be interpreted as a successful queueing of the message for later sending.
18
+ /// The actual send will occur when the device is able to send.
19
+ /// @constant MFMailComposeResultCancelled User canceled the composition.
20
+ /// @constant MFMailComposeResultSaved User successfully saved the message.
21
+ /// @constant MFMailComposeResultSent User successfully sent/queued the message.
22
+ /// @constant MFMailComposeResultFailed User's attempt to save or send was unsuccessful.
23
+ typedef NS_ENUM(NSInteger, MFMailComposeResult) {
24
+ MFMailComposeResultCancelled,
25
+ MFMailComposeResultSaved,
26
+ MFMailComposeResultSent,
27
+ MFMailComposeResultFailed
28
+ } API_AVAILABLE(ios(3.0));
29
+
30
+ /// @const MFMailComposeErrorDomain
31
+ /// @abstract Error domain for NSError values stemming from the MFMailCompose API.
32
+ /// @discussion This error domain is used as the domain for all NSError instances stemmming from the
33
+ /// MFMailCompose API. Valid error code values are declared in the <tt>MFMailComposeErrorCode</tt>
34
+ /// space.
35
+ extern NSErrorDomain const MFMailComposeErrorDomain API_AVAILABLE(ios(3.0));
36
+
37
+ /// @enum MFMailComposeErrorCode
38
+ /// @abstract Error codes for NSError values stemming from the MFMailCompose API.
39
+ /// @discussion These error codes are used as the codes for all NSError instances stemmming from the
40
+ /// MFMailCompose API. These are the only valid values for NSError instances with the
41
+ /// <tt>MFMailComposeErrorDomain</tt> domain.
42
+ /// @constant MFMailComposeErrorCodeSaveFailed Generic error indicating a save failed.
43
+ /// @constant MFMailComposeErrorCodeSendFailed Generic error indicating a send failed.
44
+ typedef NS_ENUM(NSInteger, MFMailComposeErrorCode) {
45
+ MFMailComposeErrorCodeSaveFailed,
46
+ MFMailComposeErrorCodeSendFailed
47
+ } API_AVAILABLE(ios(3.0));
48
+
49
+ @protocol MFMailComposeViewControllerDelegate;
50
+
51
+ /// @class MFMailComposeViewController
52
+ /// @abstract The MFMailComposeViewController class provides an interface for editing and sending email.
53
+ /// @discussion The MFMailComposeViewController class manages all user interaction. The client needs to set the recipient or
54
+ /// recipients. The client may also set the subject and the body of the message. Attachments may be added, if
55
+ /// so desired. After setup, the client needs to only display the view.<p>The provided delegate will be informed
56
+ /// of the user's composition completion and how they chose to complete the operation.</p>Prior to use, clients
57
+ /// should verify the user has set up the device for sending email via <tt>+[MFMailComposeViewController canSendMail]</tt>.
58
+ API_AVAILABLE(ios(3.0))
59
+ @interface MFMailComposeViewController : UINavigationController {
60
+ @private
61
+ id _internal;
62
+ }
63
+
64
+ /// @method canSendMail
65
+ /// @abstract Returns <tt>YES</tt> if the user has set up the device for sending email.
66
+ /// @discussion The client may continue to set the recipients and content if the return value was <tt>YES</tt>. If <tt>NO</tt>
67
+ /// was the result, the client has a couple options. It may choose to simply notify the user of the inability to
68
+ /// send mail, or it may issue a "mailto" URL via <tt>-[UIApplication openURL:]</tt>.
69
+ + (BOOL)canSendMail;
70
+
71
+ /// @property mailComposeDelegate
72
+ /// @abstract This property is the delegate for the MFMailComposeViewControllerDelegate method callbacks.
73
+ @property (nonatomic, nullable, weak) id<MFMailComposeViewControllerDelegate> mailComposeDelegate;
74
+
75
+ /// @method setSubject:
76
+ /// @abstract This method sets the Subject header for the email message.
77
+ /// @discussion This method will set the Subject header for the email message. This should be called prior to display.
78
+ /// Newlines are removed from the parameter.
79
+ /// <p>After the view has been presented to the user, this method will no longer change the value.</p>
80
+ /// @param subject A NSString specifying the message's Subject header.
81
+ - (void)setSubject:(NSString *)subject;
82
+
83
+ /// @method setToRecipients:
84
+ /// @abstract This method sets the To header for the email message to the specified email addresses.
85
+ /// @discussion This method will set the To header for the email message. This should be called prior to display.
86
+ /// <p>Recipient addresses should be specified as per RFC5322.</p>
87
+ /// <p>After the view has been presented to the user, this method will no longer change the value.</p>
88
+ /// @param toRecipients A NSArray of NSString instances specifying the email addresses of recipients.
89
+ - (void)setToRecipients:(nullable NSArray<NSString *> *)toRecipients;
90
+
91
+ /// @method setCcRecipients:
92
+ /// @abstract This method sets the CC header for the email message to the specified email addresses.
93
+ /// @discussion This method will set the CC header for the email message. This should be called prior to display.
94
+ /// <p>Recipient addresses should be specified as per RFC5322.</p>
95
+ /// <p>After the view has been presented to the user, this method will no longer change the value.</p>
96
+ /// @param ccRecipients A NSArray of NSString instances specifying the email addresses of recipients.
97
+ - (void)setCcRecipients:(nullable NSArray<NSString *> *)ccRecipients;
98
+
99
+ /// @method setBccRecipients:
100
+ /// @abstract This method sets the BCC header for the email message to the specified email addresses.
101
+ /// @discussion This method will set the BCC header for the email message. This should be called prior to display.
102
+ /// <p>Recipient addresses should be specified as per RFC5322.</p>
103
+ /// <p>After the view has been presented to the user, this method will no longer change the value.</p>
104
+ /// @param bccRecipients A NSArray of NSString instances specifying the email addresses of recipients.
105
+ - (void)setBccRecipients:(nullable NSArray<NSString *> *)bccRecipients;
106
+
107
+ /// @method setMessageBody:isHTML:
108
+ /// @abstract This method sets the body of the email message to the specified content.
109
+ /// @discussion This method will set the body of the email message. This should be called prior to display.
110
+ /// The user's signature, if specified, will be added after the body content.
111
+ /// @param body A NSString containing the body contents of the email message.
112
+ /// @param isHTML A boolean value indicating if the body argument is to be interpreted as HTML content.
113
+ - (void)setMessageBody:(NSString *)body isHTML:(BOOL)isHTML;
114
+
115
+ /// @method addAttachmentData:mimeType:fileName:
116
+ /// @abstract This method adds the specified attachment to the email message.
117
+ /// @discussion This method adds the specified attachment to the email message. This should be called prior to display.
118
+ /// Attachments will be appended to the end of the message.
119
+ /// @param attachment NSData containing the contents of the attachment. Must not be <tt>nil</tt>.
120
+ /// @param mimeType NSString specifying the MIME type for the attachment, as specified by the IANA
121
+ /// (http://www.iana.org/assignments/media-types/). Must not be <tt>nil</tt>.
122
+ /// @param filename NSString specifying the intended filename for the attachment. This is displayed below
123
+ /// the attachment's icon if the attachment is not decoded when displayed. Must not be <tt>nil</tt>.
124
+ - (void)addAttachmentData:(NSData *)attachment mimeType:(NSString *)mimeType fileName:(NSString *)filename;
125
+
126
+ /// @method setPreferredSendingEmailAddress:
127
+ /// @abstract This method sets the preferred sending account of the email message.
128
+ /// @discussion This method will set the sending account of the message to the specified email address if the user has an account with such an address set up. If there is no account with such an address, the default account will be used instead.
129
+ /// The sending email address should be specified as per RFC5322.
130
+ /// After the view has been presented to the user, this method will no longer change the value.
131
+ /// @param emailAddress A NSString specifying the preferred email address used to send this message.
132
+ - (void)setPreferredSendingEmailAddress:(NSString *)emailAddress API_AVAILABLE(ios(11.0));
133
+
134
+ /// @method insertCollaborationItemProvider:
135
+ /// @param itemProvider specifying the intended content for collaboration
136
+ /// @abstract Returns <tt>YES</tt> if the item provider was added to the composition successfully.
137
+ /// @discussion If the return value is YES, the itemProvider was added to the composition. The itemProvider must be non-nil.
138
+ - (void)insertCollaborationItemProvider:(NSItemProvider *)itemProvider completionHandler:(void (^)(BOOL))completionHandler API_AVAILABLE(ios(18.4));
139
+
140
+ @end
141
+
142
+
143
+ /// @protocol MFMailComposeViewControllerDelegate
144
+ /// @abstract Protocol for delegate callbacks to MFMailComposeViewController instances.
145
+ /// @discussion This protocol must be implemented for delegates of MFMailComposeViewController instances. It will
146
+ /// be called at various times while the user is composing, sending, saving, or canceling email composition.
147
+ @protocol MFMailComposeViewControllerDelegate <NSObject>
148
+ @optional
149
+ /// @method mailComposeController:didFinishWithResult:error:
150
+ /// @abstract Delegate callback which is called upon user's completion of email composition.
151
+ /// @discussion This delegate callback will be called when the user completes the email composition. How the user chose
152
+ /// to complete this task will be given as one of the parameters to the callback. Upon this call, the client
153
+ /// should remove the view associated with the controller, typically by dismissing modally.
154
+ /// @param controller The MFMailComposeViewController instance which is returning the result.
155
+ /// @param result MFMailComposeResult indicating how the user chose to complete the composition process.
156
+ /// @param error NSError indicating the failure reason if failure did occur. This will be <tt>nil</tt> if
157
+ /// result did not indicate failure.
158
+ - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(nullable NSError *)error;
159
+
160
+ @end
161
+
162
+ NS_ASSUME_NONNULL_END