peachsim 0.1.1674 → 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.
- package/cli/commands/control.ts +13 -1
- package/cli/commands/coverage-swift.ts +83 -27
- package/cli/commands/coverage.ts +219 -20
- package/cli/commands/detect.ts +10 -6
- package/cli/commands/inspect/core.ts +2 -0
- package/cli/commands/inspect/wait-ready.ts +7 -0
- package/cli/outbound-endpoints.ts +12 -0
- package/detox/index.ts +11 -1
- package/detox/jest-environment.cjs +14 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +3274 -1663
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +6 -4
- package/dist-lib/detox/jest-environment.cjs +14 -0
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +2407 -1126
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +2879 -1598
- package/dist-lib/host/fetch-proxy-handler.cjs +18 -5
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1904 -741
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +6215 -4283
- package/dist-lib/native-app-identity-project.cjs +31 -6
- package/dist-lib/native-app-identity-project.mjs +31 -6
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +134 -78
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -1
- package/dist-lib/sdk.mjs +2 -1
- package/dist-lib/skills.cjs +3570 -2160
- package/dist-lib/swift-compile.cjs +473 -351
- package/dist-lib/swift-compile.mjs +471 -349
- package/dist-lib/swift-package.cjs +36 -6
- package/dist-lib/swift-package.mjs +35 -6
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +26 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +2418 -1132
- package/dist-lib/vite.cjs +1907 -766
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +9 -1
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +2 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +51 -2
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +21 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
- package/sdk/ios/usr/include/arm/param.h +151 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +3 -0
- package/sdk/ios/usr/include/dlfcn.h +1 -2
- package/sdk/ios/usr/include/machine/param.h +42 -0
- package/sdk/ios/usr/include/net/if.h +1 -2
- package/sdk/ios/usr/include/peach/pthread.h +4 -4
- package/sdk/ios/usr/include/pthread/qos.h +304 -0
- package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
- package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
- package/sdk/ios/usr/include/sys/cdefs.h +3 -0
- package/sdk/ios/usr/include/sys/param.h +235 -0
- package/sdk/ios/usr/include/sys/proc.h +1 -0
- package/sdk/ios/usr/include/sys/qos.h +151 -12
- package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
- package/sdk/ios/wasm/include/fcntl.h +11 -0
- package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
- package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
- package/sdk/ios/wasm/include/machine/_types.h +153 -0
- package/sdk/ios/wasm/include/machine/endian.h +2 -0
- package/sdk/ios/wasm/include/machine/limits.h +2 -0
- package/sdk/ios/wasm/include/machine/types.h +30 -0
- package/sdk/ios/wasm/include/poll.h +8 -0
- package/sdk/ios/wasm/include/pthread.h +50 -0
- package/sdk/ios/wasm/include/signal.h +72 -0
- package/sdk/ios/wasm/include/stdlib.h +3 -0
- package/sdk/ios/wasm/include/string.h +10 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
- package/sdk/ios/wasm/include/sys/mman.h +122 -0
- package/sdk/ios/wasm/include/sys/select.h +37 -0
- package/sdk/ios/wasm/include/sys/signal.h +259 -0
- package/sdk/ios/wasm/include/sys/socket.h +8 -0
- package/sdk/ios/wasm/include/sys/types.h +14 -0
- package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
- package/sdk/ios/wasm/include/sys/uio.h +11 -0
- package/sdk/ios/wasm/include/sys/wait.h +89 -0
- package/sdk/ios/wasm/include/time.h +8 -0
- package/sdk/ios/wasm/include/unistd.h +17 -0
- package/src/bridge-contract.ts +2 -0
- package/src/chromium-admission.ts +10 -5
- package/src/device-catalog.ts +4 -4
- package/src/host/fetch-proxy-handler.ts +20 -0
- package/src/metro-plugin.ts +5 -2
- package/src/nitro-adapter.lock.json +6 -6
- package/src/nitro-compile.ts +63 -2
- package/src/numbered-lock.ts +72 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
- package/src/react-native-coverage/capability-source-references.ts +50 -13
- package/src/react-native-coverage/native-source-credit.ts +126 -0
- package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
- package/src/react-native-coverage/native-surface.ts +49 -0
- package/src/react-native-coverage/verified-reach.ts +22 -2
- package/src/runtime-assets.ts +17 -0
- package/src/swift-compile.ts +84 -48
- package/src/swift-coverage/indexing.ts +17 -1
- package/src/swift-coverage/sdk.ts +71 -0
- package/src/swift-coverage/source.ts +74 -2
- package/src/swift-coverage/types.ts +6 -0
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-host.ts +133 -14
- package/src/swift-objc-compile.ts +6 -21
- package/src/swift-objc-metadata.ts +2 -8
- package/src/swift-objc-platform.ts +53 -0
- package/src/swift-objc-standin.ts +45 -1
- package/src/swift-package-manifest.ts +48 -3
- package/src/swift-package.ts +59 -9
- package/src/swift-packages.ts +157 -44
- package/src/swift-source-pods.ts +288 -0
- package/src/swift-toolchain.ts +32 -10
- package/src/vite-plugin-one.ts +5 -4
- package/src/worker-system-chunks.ts +7 -1
- package/src/xcode-project.ts +40 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
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;
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
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;
|
|
@@ -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>;
|
package/package.json
CHANGED
package/runtime-companion.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":1,"sha256":"
|
|
1
|
+
{"abi":1,"sha256":"0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630","file":"node/cli-0aa1bb93377f2ed084f869ab161285ff9e1c638510065738c97f0cbe806bb630.cjs"}
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
#endif
|
|
50
50
|
#endif
|
|
51
51
|
typedef unsigned char Boolean;
|
|
52
|
-
typedef unsigned
|
|
52
|
+
typedef unsigned char UInt8;
|
|
53
53
|
typedef int32_t SInt32;
|
|
54
|
+
typedef unsigned int UInt32;
|
|
54
55
|
typedef SInt32 OSStatus;
|
|
55
56
|
typedef unsigned long CFOptionFlags;
|
|
56
57
|
typedef signed long CFIndex;
|
|
@@ -126,7 +127,56 @@ typedef CF_ENUM(CFIndex, CFPropertyListFormat) {
|
|
|
126
127
|
};
|
|
127
128
|
CFUUIDRef CFUUIDCreate(CFAllocatorRef alloc);
|
|
128
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);
|
|
129
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);
|
|
130
180
|
#pragma clang arc_cf_code_audited end
|
|
131
181
|
#ifdef __cplusplus
|
|
132
182
|
}
|
|
@@ -232,7 +282,6 @@ extern CFNumberType CFNumberGetType(CFNumberRef number);
|
|
|
232
282
|
}
|
|
233
283
|
#endif
|
|
234
284
|
extern CFComparisonResult CFStringCompare(CFStringRef theString1, CFStringRef theString2, CFStringCompareFlags compareOptions);
|
|
235
|
-
typedef unsigned char UInt8;
|
|
236
285
|
extern CFStringRef __CFStringMakeConstantString(const char *cStr);
|
|
237
286
|
#define CFSTR(cStr) __CFStringMakeConstantString("" cStr "")
|
|
238
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>
|
|
@@ -325,6 +326,7 @@ __attribute__((swift_bridge("Swift.String")))
|
|
|
325
326
|
- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask;
|
|
326
327
|
@property (readonly) float floatValue;
|
|
327
328
|
- (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
|
|
329
|
+
- (NSString *)substringFromIndex:(NSUInteger)from;
|
|
328
330
|
- (NSString *)substringWithRange:(NSRange)range;
|
|
329
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)));
|
|
330
332
|
@end
|
|
@@ -381,6 +383,7 @@ __attribute__((swift_bridge("Swift.Array")))
|
|
|
381
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)));
|
|
382
384
|
@end
|
|
383
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)));
|
|
384
387
|
- (void)removeObjectIdenticalTo:(ObjectType)anObject;
|
|
385
388
|
- (void)removeObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
|
|
386
389
|
+ (instancetype)arrayWithCapacity:(NSUInteger)numItems;
|
|
@@ -573,6 +576,7 @@ __attribute__((swift_bridge("Data")))
|
|
|
573
576
|
- (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
|
|
574
577
|
@property (readonly) void *mutableBytes NS_RETURNS_INNER_POINTER;
|
|
575
578
|
@property NSUInteger length;
|
|
579
|
+
+ (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems;
|
|
576
580
|
+ (nullable instancetype)dataWithLength:(NSUInteger)length;
|
|
577
581
|
@end
|
|
578
582
|
@interface NSMutableData (NSExtendedMutableData)
|
|
@@ -789,6 +793,8 @@ typedef struct __attribute__((objc_bridge(id))) __SecTrust *SecTrustRef;
|
|
|
789
793
|
@end
|
|
790
794
|
__attribute__((swift_bridge("UUID")))
|
|
791
795
|
@interface NSUUID : NSObject <NSCopying, NSSecureCoding>
|
|
796
|
+
+ (instancetype)UUID;
|
|
797
|
+
- (void)getUUIDBytes:(uuid_t _Nonnull)uuid;
|
|
792
798
|
@property (readonly, copy) NSString *UUIDString;
|
|
793
799
|
@end
|
|
794
800
|
__attribute__((swift_bridge("IndexPath")))
|
|
@@ -823,6 +829,8 @@ __attribute__((swift_bridge("Locale")))
|
|
|
823
829
|
@end
|
|
824
830
|
__attribute__((swift_bridge("TimeZone")))
|
|
825
831
|
@interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
|
|
832
|
+
@property (class, readonly, copy) NSTimeZone *localTimeZone;
|
|
833
|
+
@property (nullable, readonly, copy) NSString *abbreviation;
|
|
826
834
|
+ (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
|
|
827
835
|
@end
|
|
828
836
|
__attribute__((swift_bridge("Calendar")))
|
|
@@ -837,6 +845,7 @@ __attribute__((swift_bridge("Notification")))
|
|
|
837
845
|
NS_SWIFT_NAME(NotificationCenter)
|
|
838
846
|
@interface NSNotificationCenter : NSObject
|
|
839
847
|
- (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject;
|
|
848
|
+
- (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo;
|
|
840
849
|
- (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable id)anObject;
|
|
841
850
|
- (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable id)anObject;
|
|
842
851
|
@property (class, readonly, strong) NSNotificationCenter *defaultCenter;
|
|
@@ -852,6 +861,8 @@ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSize;
|
|
|
852
861
|
FOUNDATION_EXPORT NSFileAttributeKey const NSFileCreationDate;
|
|
853
862
|
FOUNDATION_EXPORT NSFileAttributeKey const NSFileModificationDate;
|
|
854
863
|
FOUNDATION_EXPORT NSFileAttributeKey const NSFileProtectionKey __attribute__((availability(ios,introduced=4.0)));
|
|
864
|
+
FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemSize;
|
|
865
|
+
FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFreeSize;
|
|
855
866
|
typedef NSString *NSFileProtectionType NS_TYPED_ENUM;
|
|
856
867
|
FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionNone __attribute__((availability(ios,introduced=4.0)));
|
|
857
868
|
FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionComplete __attribute__((availability(ios,introduced=4.0)));
|
|
@@ -919,6 +930,12 @@ NS_SWIFT_NAME(Bundle)
|
|
|
919
930
|
@interface NSBundle : NSObject
|
|
920
931
|
- (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext;
|
|
921
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;
|
|
922
939
|
@property (nullable, readonly, copy) NSString *executablePath;
|
|
923
940
|
@property (nullable, readonly, copy) NSDictionary<NSString *, id> *infoDictionary;
|
|
924
941
|
@property (class, readonly, strong) NSBundle *mainBundle;
|
|
@@ -979,6 +996,7 @@ NS_SWIFT_NAME(Thread)
|
|
|
979
996
|
@property (nullable, copy) NSString *name __attribute__((availability(ios,introduced=2.0)));
|
|
980
997
|
- (instancetype)initWithTarget:(id)target selector:(SEL)selector object:(nullable id)argument __attribute__((availability(ios,introduced=2.0)));
|
|
981
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)));
|
|
982
1000
|
- (void)cancel __attribute__((availability(ios,introduced=2.0)));
|
|
983
1001
|
+ (void)sleepForTimeInterval:(NSTimeInterval)ti NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use Task.sleep(until:clock:) instead.");
|
|
984
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)));
|
|
@@ -1030,6 +1048,7 @@ typedef NS_OPTIONS(NSUInteger, NSSearchPathDomainMask) {
|
|
|
1030
1048
|
NSSystemDomainMask = 8,
|
|
1031
1049
|
NSAllDomainsMask = 0x0ffff
|
|
1032
1050
|
};
|
|
1051
|
+
FOUNDATION_EXPORT NSString *NSHomeDirectory(void);
|
|
1033
1052
|
FOUNDATION_EXPORT NSArray<NSString *> *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde);
|
|
1034
1053
|
NS_SWIFT_NAME(FileManager)
|
|
1035
1054
|
typedef NS_OPTIONS(NSUInteger, NSDirectoryEnumerationOptions) {
|
|
@@ -1093,6 +1112,7 @@ typedef NS_ENUM(NSUInteger, NSKeyValueChange) {
|
|
|
1093
1112
|
- (nullable NSArray<NSString *> *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
|
|
1094
1113
|
- (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error;
|
|
1095
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)));
|
|
1096
1116
|
- (BOOL)fileExistsAtPath:(NSString *)path;
|
|
1097
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)));
|
|
1098
1118
|
- (nullable NSData *)contentsAtPath:(NSString *)path;
|
|
@@ -1118,6 +1138,7 @@ NS_SWIFT_NAME(ProcessInfo)
|
|
|
1118
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)));
|
|
1119
1139
|
@property (class, readonly, strong) NSProcessInfo *processInfo;
|
|
1120
1140
|
@property (copy) NSString *processName;
|
|
1141
|
+
@property (readonly) int processIdentifier;
|
|
1121
1142
|
@property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
|
|
1122
1143
|
@property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
|
|
1123
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
|
+
};
|
package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h
ADDED
|
@@ -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
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MFMailDraft.h
|
|
3
|
+
// MessageUI
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2025 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
@interface MFMailDraft: NSObject
|
|
13
|
+
|
|
14
|
+
@property (nonatomic, nullable, readonly) NSString *from;
|
|
15
|
+
@property (nonatomic, nonnull, readonly) NSString *subject;
|
|
16
|
+
@property (nonatomic, nonnull, readonly) NSAttributedString *body;
|
|
17
|
+
@property (nonatomic, nonnull, readonly) NSArray<NSString *> *to;
|
|
18
|
+
@property (nonatomic, nonnull, readonly) NSArray<NSString *> *cc;
|
|
19
|
+
|
|
20
|
+
- (instancetype)initWithSubject:(NSString *)subject body:(NSAttributedString *)body from:(NSString *)from to:(NSArray<NSString *> *)to cc:(NSArray<NSString *> *)cc;
|
|
21
|
+
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#import <MessageUI/MFMessageComposeViewController.h>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
+
|
|
6
|
+
@interface MFMessageComposeViewController (UPI)
|
|
7
|
+
|
|
8
|
+
/// @method setUPIVerificationCodeSendCompletion:
|
|
9
|
+
/// @abstract Configures the instance of `MFMessageComposeViewController` for UPI device validation
|
|
10
|
+
/// @discussion If the host app has the `com.apple.developer.upi-device-validation` managed entitlement, this
|
|
11
|
+
/// will configure the instance of `MFMessageComposeViewController` with non-editable recipients
|
|
12
|
+
/// and body fields. This API is only functional on devices with SMS capability and is only
|
|
13
|
+
/// compatible with non-iMessagable recipients. The send completion handler will be invoked with
|
|
14
|
+
/// `YES` only once the SMS was successfully transmitted to the sender's cellular carrier. If the
|
|
15
|
+
/// SMS failed to send, the completion handler will be invoked with `NO`.
|
|
16
|
+
///
|
|
17
|
+
/// The completion handler will be in invoked on the main thread. It will only be invoked after
|
|
18
|
+
/// `MFMessageComposeViewController` delegate's `-messageComposeViewController:didFinishWithResult:`
|
|
19
|
+
/// method was called. That method is called in response to user action (the user hit cancel or
|
|
20
|
+
/// send); the send completion handler is called with the transmission result of the message. It
|
|
21
|
+
/// will not be called at all if `-messageComposeViewController:didFinishWithResult:` was not
|
|
22
|
+
/// called with `MessageComposeResultSent`.
|
|
23
|
+
///
|
|
24
|
+
/// Because it can take some time to send a message, the completion handler could be invoked
|
|
25
|
+
/// after the `MFMessageComposeViewController` instance is deallocated.
|
|
26
|
+
/// @param completion A block invoked with a BOOL of whether the message was actually sent.
|
|
27
|
+
- (void)setUPIVerificationCodeSendCompletion:(void (^)(BOOL didSend))completion NS_SWIFT_DISABLE_ASYNC API_AVAILABLE(ios(17.0));
|
|
28
|
+
|
|
29
|
+
@end
|
|
30
|
+
|
|
31
|
+
NS_ASSUME_NONNULL_END
|