peachsim 0.1.1635 → 0.1.1640

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 (129) hide show
  1. package/README.md +5 -1
  2. package/cli/app-config.ts +14 -5
  3. package/cli/app-stubs.ts +62 -13
  4. package/cli/bridge-flow-runner.ts +2 -2
  5. package/cli/cloud-client.ts +60 -40
  6. package/cli/commands/doctor.ts +13 -5
  7. package/cli/commands/flow.ts +1 -1
  8. package/cli/commands/inspect/shared.ts +9 -4
  9. package/cli/commands/inspect.ts +65 -47
  10. package/cli/commands/preview.ts +1 -1
  11. package/cli/commands/record.ts +97 -47
  12. package/cli/commands/swift.ts +9 -3
  13. package/cli/commands/upload.ts +48 -42
  14. package/cli/drivers/playwright-sim-host.ts +65 -42
  15. package/cli/main.ts +1 -1
  16. package/cli/outbound-endpoints.ts +7 -5
  17. package/cli/pause-aware-timeout.ts +4 -0
  18. package/cli/ws-bridge.ts +19 -10
  19. package/detox/attempt-events.cjs +62 -5
  20. package/detox/attempt-events.d.cts +7 -0
  21. package/detox/expectations.ts +7 -3
  22. package/detox/index.ts +121 -47
  23. package/detox/motion-change.cjs +170 -21
  24. package/detox/motion-change.d.cts +32 -0
  25. package/detox/navigation-lifecycle.ts +35 -3
  26. package/dist-lib/agent-daemon-client.cjs +1 -1
  27. package/dist-lib/agent-events.cjs +1 -1
  28. package/dist-lib/attached-projects.cjs +1 -1
  29. package/dist-lib/auth/shared-session.cjs +1 -1
  30. package/dist-lib/backend-origin.cjs +8 -7
  31. package/dist-lib/beta.cjs +1 -1
  32. package/dist-lib/beta.mjs +1 -1
  33. package/dist-lib/bridge-constants.cjs +1 -1
  34. package/dist-lib/bridge-contract-input.cjs +1 -1
  35. package/dist-lib/bridge-contract-input.mjs +1 -1
  36. package/dist-lib/bridge-contract.cjs +1 -1
  37. package/dist-lib/bridge-contract.mjs +1 -1
  38. package/dist-lib/bundle-channel.cjs +4038 -1983
  39. package/dist-lib/capture-contract.cjs +1 -1
  40. package/dist-lib/capture-contract.mjs +1 -1
  41. package/dist-lib/cloud-contract.cjs +1 -1
  42. package/dist-lib/cloud-contract.mjs +1 -1
  43. package/dist-lib/cloud-test-args.cjs +1 -1
  44. package/dist-lib/cloud-test-args.mjs +1 -1
  45. package/dist-lib/cloud.cjs +1 -1
  46. package/dist-lib/cloud.mjs +1 -1
  47. package/dist-lib/config.cjs +1 -1
  48. package/dist-lib/config.mjs +1 -1
  49. package/dist-lib/detox/index.cjs +509 -86
  50. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  51. package/dist-lib/expo-swift-bundle.cjs +3551 -1574
  52. package/dist-lib/expo-swift-metadata.cjs +9 -7
  53. package/dist-lib/expo-swift-metadata.mjs +9 -7
  54. package/dist-lib/home-paths.cjs +1 -1
  55. package/dist-lib/host/bridge-host.cjs +43633 -2635
  56. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  57. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  58. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  59. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  60. package/dist-lib/host/websocket-proxy.cjs +1 -1
  61. package/dist-lib/index.cjs +2748 -128
  62. package/dist-lib/jump-to-source-babel.cjs +1 -1
  63. package/dist-lib/jump-to-source-native.cjs +1 -1
  64. package/dist-lib/kotlin-host.cjs +1 -1
  65. package/dist-lib/menu.cjs +1 -1
  66. package/dist-lib/menu.mjs +1 -1
  67. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  68. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  69. package/dist-lib/metro-production-bundle.cjs +1 -1
  70. package/dist-lib/metro-production-bundle.mjs +1 -1
  71. package/dist-lib/metro.cjs +2547 -83
  72. package/dist-lib/native-app-identity-project.cjs +237 -50
  73. package/dist-lib/native-app-identity-project.mjs +237 -50
  74. package/dist-lib/native-app-identity.cjs +29 -30
  75. package/dist-lib/native-app-identity.mjs +29 -30
  76. package/dist-lib/native-firebase-metadata.cjs +1 -1
  77. package/dist-lib/native-firebase-metadata.mjs +1 -1
  78. package/dist-lib/plist.cjs +1 -1
  79. package/dist-lib/plist.mjs +1 -1
  80. package/dist-lib/profiles.cjs +1 -1
  81. package/dist-lib/public-brand.cjs +1 -1
  82. package/dist-lib/react-native-host-modules.cjs +2 -2
  83. package/dist-lib/react-native-host-modules.mjs +2 -2
  84. package/dist-lib/scripts/dev-server-scanner.cjs +8 -6
  85. package/dist-lib/sdk.cjs +1 -1
  86. package/dist-lib/sdk.mjs +1 -1
  87. package/dist-lib/skills.cjs +65403 -22739
  88. package/dist-lib/swift-compile.cjs +93 -32
  89. package/dist-lib/swift-compile.mjs +93 -32
  90. package/dist-lib/swift-package.cjs +1 -1
  91. package/dist-lib/swift-package.mjs +1 -1
  92. package/dist-lib/swift-submit.cjs +7 -5
  93. package/dist-lib/swift-submit.mjs +7 -5
  94. package/dist-lib/swift-toolchain.cjs +316 -41
  95. package/dist-lib/swift.cjs +1 -1
  96. package/dist-lib/vite-swift.cjs +7335 -5432
  97. package/dist-lib/vite.cjs +2857 -12
  98. package/dist-lib/worklet-executable.cjs +14 -2
  99. package/dist-lib/worklet-executable.mjs +14 -2
  100. package/package.json +1 -1
  101. package/src/backend-origin.ts +13 -6
  102. package/src/expo-swift-host.ts +5 -2
  103. package/src/expoKotlinContract.ts +4 -7
  104. package/src/expoSwiftContract.ts +4 -6
  105. package/src/host/staged-host-files.ts +9 -0
  106. package/src/native-app-identity-project.ts +1 -4
  107. package/src/native-app-identity.ts +1 -4
  108. package/src/nativeAppIconContract.ts +1 -4
  109. package/src/output-lock-stdio.ts +36 -0
  110. package/src/react-native-bridge-modules.ts +21 -6
  111. package/src/react-native-host-modules.ts +4 -1
  112. package/src/settings-bundle.ts +1 -4
  113. package/src/swift-compile.ts +91 -33
  114. package/src/swift-distribution.lock.json +22 -12
  115. package/src/swift-distribution.ts +103 -4
  116. package/src/swift-host.ts +89 -26
  117. package/src/swift-icu.ts +16 -10
  118. package/src/swift-objc-compile.ts +355 -0
  119. package/src/swift-objc-sdk.ts +689 -18
  120. package/src/swift-objc-standin.ts +126 -14
  121. package/src/swift-package-manifest.ts +39 -1
  122. package/src/swift-packages.ts +35 -21
  123. package/src/swift-standin-emit.ts +40 -7
  124. package/src/swift-standins.ts +404 -138
  125. package/src/swift-submit.ts +3 -5
  126. package/src/swift-toolchain.ts +378 -46
  127. package/src/worker-system-chunks.ts +11 -12
  128. package/src/worklet-executable.ts +19 -1
  129. package/src/xcode-project.ts +270 -30
@@ -11,6 +11,20 @@ export const IOS_SDK_TARGET = 'arm64-apple-ios16.0-simulator'
11
11
 
12
12
  /** the clang headers and module maps, by path under the sdk root. */
13
13
  export const IOS_SDK_HEADERS: Record<string, string> = {
14
+ 'usr/include/sys/xattr.h': `#pragma once
15
+ #include <sys/types.h>
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+ int setxattr(const char *path, const char *name, const void *value, size_t size, u_int32_t position, int options);
20
+ int removexattr(const char *path, const char *name, int options);
21
+ #ifdef __cplusplus
22
+ }
23
+ #endif
24
+ `,
25
+ 'usr/include/MacTypes.h': `#pragma once
26
+ enum { noErr = 0 };
27
+ `,
14
28
  // darwin pointer and mach port identities used in public native headers.
15
29
  'usr/include/pthread.h': `#pragma once
16
30
  struct _opaque_pthread_t;
@@ -48,6 +62,21 @@ typedef natural_t mach_msg_type_number_t;
48
62
  #define TARGET_CPU_ARM64 1
49
63
  #define TARGET_CPU_X86_64 0
50
64
  #define TARGET_RT_64_BIT 1
65
+ `,
66
+ 'usr/include/assert.h': `#include <sys/cdefs.h>
67
+ #undef assert
68
+ #ifdef NDEBUG
69
+ #define assert(e) ((void)0)
70
+ #else
71
+ #ifdef __cplusplus
72
+ extern "C" {
73
+ #endif
74
+ void __assert_rtn(const char *, const char *, int, const char *) __attribute__((noreturn, cold, disable_tail_calls));
75
+ #ifdef __cplusplus
76
+ }
77
+ #endif
78
+ #define assert(e) (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE_NAME__, __LINE__, #e) : (void)0)
79
+ #endif
51
80
  `,
52
81
  'usr/include/stdlib.h': `#pragma once
53
82
  #include <stddef.h>
@@ -67,11 +96,57 @@ char *strdup(const char *);
67
96
  void *memcpy(void *, const void *, size_t);
68
97
  void *memset(void *, int, size_t);
69
98
  int strcmp(const char *, const char *);
99
+ `,
100
+ 'usr/include/limits.h': `#pragma once
101
+ #define LONG_MAX 0x7fffffffffffffffL
102
+ #define LONG_MIN (-LONG_MAX - 1L)
103
+ #define ULONG_MAX 0xffffffffffffffffUL
104
+ `,
105
+ 'usr/include/os/log.h': `#pragma once
106
+ #import <objc/NSObject.h>
107
+ @protocol OS_os_log <NSObject>
108
+ @end
109
+ typedef NSObject<OS_os_log> *os_log_t;
110
+ typedef uint8_t os_log_type_t;
111
+ `,
112
+ 'usr/include/dispatch/dispatch.h': `#pragma once
113
+ #include <stdint.h>
114
+ #import <objc/NSObject.h>
115
+ #define OS_OBJECT_USE_OBJC 1
116
+ @protocol OS_dispatch_queue <NSObject>
117
+ @end
118
+ typedef NSObject<OS_dispatch_queue> *dispatch_queue_t;
119
+ @protocol OS_dispatch_source <NSObject>
120
+ @end
121
+ typedef NSObject<OS_dispatch_source> *dispatch_source_t;
122
+ typedef uint64_t dispatch_time_t;
123
+ typedef void (^dispatch_block_t)(void);
124
+ typedef intptr_t dispatch_once_t __attribute__((availability(swift, unavailable, message="Use lazily initialized globals instead")));
125
+ #ifdef __cplusplus
126
+ extern "C" {
127
+ #endif
128
+ void dispatch_once(dispatch_once_t * _Nonnull predicate, __attribute__((noescape)) dispatch_block_t _Nonnull block) __attribute__((nothrow, nonnull)) __attribute__((availability(swift, unavailable, message="Use lazily initialized globals instead")));
129
+ #ifdef __cplusplus
130
+ }
131
+ #endif
132
+ @protocol OS_dispatch_queue_attr <NSObject>
133
+ @end
134
+ typedef NSObject<OS_dispatch_queue_attr> *dispatch_queue_attr_t;
135
+ `,
136
+ 'usr/include/sys/cdefs.h': `#pragma once
137
+ #define __deprecated __attribute__((__deprecated__))
138
+ #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
139
+ #define __deprecated_enum_msg(_msg) __deprecated_msg(_msg)
140
+ #define __unavailable __attribute__((__unavailable__))
70
141
  `,
71
142
  'usr/include/sys/types.h': `#pragma once
143
+ #include <sys/cdefs.h>
72
144
  #include <time.h>
73
145
  #include <stddef.h>
146
+ #include <stdint.h>
74
147
  typedef long ssize_t;
148
+ typedef uint8_t u_int8_t;
149
+ typedef uint32_t u_int32_t;
75
150
  `,
76
151
  'usr/include/time.h': `#pragma once
77
152
  typedef long time_t;
@@ -140,20 +215,39 @@ struct nlist_64 {
140
215
  }
141
216
  `,
142
217
  'usr/include/objc/NSObject.h': `#pragma once
218
+ #include <sys/types.h>
143
219
  #include <stdint.h>
144
220
  #include <stddef.h>
145
221
  #include <stdbool.h>
146
222
  #include <stdarg.h>
223
+ #if defined(__OBJC_GNUSTEP_RUNTIME_ABI__)
224
+ #include <objc/runtime.h>
225
+ #else
147
226
  typedef bool BOOL;
227
+ #endif
148
228
  #define YES ((BOOL)1)
149
229
  #define NO ((BOOL)0)
150
- #define nil ((id)0)
230
+ #if __has_feature(cxx_nullptr)
231
+ #define nil nullptr
232
+ #define Nil nullptr
233
+ #else
234
+ #define nil NULL
235
+ #define Nil NULL
236
+ #endif
151
237
  typedef long NSInteger;
152
238
  typedef unsigned long NSUInteger;
239
+ #if !defined(__OBJC_GNUSTEP_RUNTIME_ABI__)
153
240
  typedef void (*IMP)(void);
241
+ #endif
154
242
  struct _NSZone;
155
243
  @class NSString, Protocol;
244
+ #if __has_feature(objc_arc)
245
+ #define OBJC_ARC_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
246
+ #else
247
+ #define OBJC_ARC_UNAVAILABLE
248
+ #endif
156
249
  @protocol NSObject
250
+ - (Class)class __attribute__((availability(swift, unavailable, message="use 'type(of: anObject)' instead")));
157
251
  - (BOOL)isEqual:(id)object;
158
252
  @property (readonly) NSUInteger hash;
159
253
  @property (readonly) Class superclass;
@@ -165,6 +259,8 @@ struct _NSZone;
165
259
  - (BOOL)isMemberOfClass:(Class)aClass;
166
260
  - (BOOL)conformsToProtocol:(Protocol *)aProtocol;
167
261
  - (BOOL)respondsToSelector:(SEL)aSelector;
262
+ - (oneway void)release OBJC_ARC_UNAVAILABLE;
263
+ - (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
168
264
  @property (readonly, copy) NSString *description;
169
265
  @optional
170
266
  @property (readonly, copy) NSString *debugDescription;
@@ -178,6 +274,7 @@ __attribute__((objc_root_class))
178
274
  - (instancetype)init __attribute__((objc_designated_initializer));
179
275
  + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
180
276
  + (instancetype)alloc __attribute__((availability(swift, unavailable, message="use object initializers instead")));
277
+ + (Class)class __attribute__((availability(swift, unavailable, message="use 'aClass.self' instead")));
181
278
  - (id)copy;
182
279
  - (id)mutableCopy;
183
280
  + (BOOL)instancesRespondToSelector:(SEL)aSelector;
@@ -192,10 +289,214 @@ __attribute__((objc_root_class))
192
289
  @end
193
290
  `,
194
291
  'System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h': `#pragma once
195
- #import <Foundation/Foundation.h>
292
+ #include <MacTypes.h>
293
+ #import <objc/NSObject.h>
294
+ typedef unsigned char Boolean;
295
+ typedef int32_t SInt32;
296
+ typedef SInt32 OSStatus;
297
+ #define CF_ENUM_ATTRIBUTES_ __attribute__((enum_extensibility(open)))
298
+ #define __PEACH_ENUM_GET(_1, _2, NAME, ...) NAME
299
+ #define __PEACH_NAMED_ENUM(_type, _name) enum __attribute__((enum_extensibility(open))) _name : _type _name; enum _name : _type
300
+ #define __PEACH_ANON_ENUM(_type) enum __attribute__((enum_extensibility(open))) : _type
301
+ #define CF_ENUM(...) __PEACH_ENUM_GET(__VA_ARGS__, __PEACH_NAMED_ENUM, __PEACH_ANON_ENUM, )(__VA_ARGS__)
302
+ #define CF_CLOSED_ENUM(_type, _name) enum __attribute__((enum_extensibility(closed))) _name : _type _name; enum _name : _type
303
+ #define CF_OPTIONS(_type, _name) enum __attribute__((flag_enum, enum_extensibility(open))) _name : _type _name; enum _name : _type
196
304
  typedef const struct __attribute__((objc_bridge(NSString))) __CFString *CFStringRef;
305
+ @class NSDictionary, NSNumber;
306
+ typedef const __attribute__((objc_bridge(id))) void *CFTypeRef;
307
+ typedef const struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary *CFDictionaryRef;
308
+ typedef const struct __attribute__((objc_bridge(NSNumber))) __CFBoolean *CFBooleanRef;
309
+ #ifdef __cplusplus
310
+ extern "C" {
311
+ #endif
312
+ extern const CFBooleanRef kCFBooleanTrue;
313
+ #pragma clang arc_cf_code_audited begin
314
+ void CFRelease(CFTypeRef cf);
315
+ #pragma clang arc_cf_code_audited end
316
+ #ifdef __cplusplus
317
+ }
318
+ #endif
319
+ `,
320
+ 'System/Library/Frameworks/Security.framework/Headers/Security.h': `#pragma once
321
+ #include <Security/SecBase.h>
322
+ #include <Security/SecItem.h>
323
+ `,
324
+ 'System/Library/Frameworks/Security.framework/Headers/SecBase.h': `#pragma once
325
+ #include <CoreFoundation/CoreFoundation.h>
326
+ enum { errSecSuccess = 0, errSecItemNotFound = -25300 };
327
+ `,
328
+ 'System/Library/Frameworks/Security.framework/Headers/SecItem.h': `#pragma once
329
+ #include <Security/SecBase.h>
330
+ #ifdef __cplusplus
331
+ extern "C" {
332
+ #endif
333
+ #pragma clang assume_nonnull begin
334
+ #pragma clang arc_cf_code_audited begin
335
+ extern const CFStringRef kSecClass __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
336
+ extern const CFStringRef kSecClassGenericPassword __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=2.0)));
337
+ extern const CFStringRef kSecAttrAccount __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
338
+ extern const CFStringRef kSecAttrService __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
339
+ extern const CFStringRef kSecAttrAccessGroup __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=3.0)));
340
+ extern const CFStringRef kSecReturnAttributes __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
341
+ extern const CFStringRef kSecReturnData __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
342
+ extern const CFStringRef kSecValueData __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
343
+ extern const CFStringRef kSecAttrAccessible __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=4.0)));
344
+ extern const CFStringRef kSecAttrAccessibleAfterFirstUnlock __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=4.0)));
345
+ extern const CFStringRef kSecAttrLabel __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
346
+ extern const CFStringRef kSecMatchLimit __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
347
+ extern const CFStringRef kSecMatchLimitAll __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
348
+ extern const CFStringRef kSecReturnRef __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
349
+ OSStatus SecItemCopyMatching(CFDictionaryRef query, CFTypeRef * _Nullable __attribute__((cf_returns_retained)) result) __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
350
+ OSStatus SecItemAdd(CFDictionaryRef attributes, CFTypeRef * _Nullable __attribute__((cf_returns_retained)) result) __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
351
+ OSStatus SecItemUpdate(CFDictionaryRef query, CFDictionaryRef attributesToUpdate) __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
352
+ OSStatus SecItemDelete(CFDictionaryRef query) __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=2.0)));
353
+ #pragma clang arc_cf_code_audited end
354
+ #pragma clang assume_nonnull end
355
+ #ifdef __cplusplus
356
+ }
357
+ #endif
358
+ `,
359
+ 'System/Library/Frameworks/Security.framework/Modules/module.modulemap': `framework module Security {
360
+ umbrella header "Security.h"
361
+ export *
362
+ module * { export * }
363
+ }
364
+ `,
365
+ 'System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h': `#pragma once
366
+ @class UIImage;
367
+ #import <AVFoundation/AVAsset.h>
368
+ #import <AVFoundation/AVMetadataItem.h>
369
+ #import <AVFoundation/AVTimedMetadataGroup.h>
370
+ `,
371
+ 'System/Library/Frameworks/AVFoundation.framework/Headers/AVAsynchronousKeyValueLoading.h': `#pragma once
372
+ #import <Foundation/Foundation.h>
373
+ NS_ASSUME_NONNULL_BEGIN
374
+ typedef NS_ENUM(NSInteger, AVKeyValueStatus) {
375
+ AVKeyValueStatusUnknown = 0,
376
+ AVKeyValueStatusLoading = 1,
377
+ AVKeyValueStatusLoaded = 2,
378
+ AVKeyValueStatusFailed = 3,
379
+ AVKeyValueStatusCancelled = 4
380
+ };
381
+ @protocol AVAsynchronousKeyValueLoading
382
+ - (AVKeyValueStatus)statusOfValueForKey:(NSString *)key error:(NSError * _Nullable * _Nullable)outError;
383
+ - (void)loadValuesAsynchronouslyForKeys:(NSArray<NSString *> *)keys completionHandler:(nullable void (^)(void))handler;
384
+ @end
385
+ NS_ASSUME_NONNULL_END
386
+ `,
387
+ 'System/Library/Frameworks/AVFoundation.framework/Headers/AVMetadataFormat.h': `#pragma once
388
+ #import <Foundation/Foundation.h>
389
+ typedef NSString * AVMetadataFormat NS_STRING_ENUM;
390
+ typedef NSString * AVMetadataKeySpace NS_EXTENSIBLE_STRING_ENUM;
391
+ typedef NSString * AVMetadataKey NS_EXTENSIBLE_STRING_ENUM;
392
+ typedef NSString * AVMetadataExtraAttributeKey NS_EXTENSIBLE_STRING_ENUM;
393
+ FOUNDATION_EXPORT AVMetadataKey const AVMetadataID3MetadataKeyAttachedPicture;
394
+ FOUNDATION_EXPORT AVMetadataKey const AVMetadataID3MetadataKeyTitleDescription;
395
+ FOUNDATION_EXPORT AVMetadataKey const AVMetadataID3MetadataKeyUserURL;
396
+ FOUNDATION_EXPORT AVMetadataKey const AVMetadataCommonKeyArtwork;
397
+ FOUNDATION_EXPORT AVMetadataKeySpace const AVMetadataKeySpaceCommon;
398
+ FOUNDATION_EXPORT AVMetadataKeySpace const AVMetadataKeySpaceID3;
399
+ FOUNDATION_EXPORT AVMetadataKeySpace const AVMetadataKeySpaceiTunes;
400
+ `,
401
+ 'System/Library/Frameworks/AVFoundation.framework/Headers/AVAsset.h': `#pragma once
402
+ #import <AVFoundation/AVAsynchronousKeyValueLoading.h>
403
+ #import <AVFoundation/AVMetadataFormat.h>
404
+ NS_ASSUME_NONNULL_BEGIN
405
+ @class AVMetadataItem, AVTimedMetadataGroup;
406
+ @interface AVAsset : NSObject <NSCopying, AVAsynchronousKeyValueLoading>
407
+ @property (nonatomic, readonly) NSArray<AVMetadataFormat> *availableMetadataFormats;
408
+ @property (readonly) NSArray<NSLocale *> *availableChapterLocales;
409
+ @property (nonatomic, readonly) NSArray<AVMetadataItem *> *commonMetadata;
410
+ - (NSArray<AVMetadataItem *> *)metadataForFormat:(AVMetadataFormat)format;
411
+ - (NSArray<AVTimedMetadataGroup *> *)chapterMetadataGroupsBestMatchingPreferredLanguages:(NSArray<NSString *> *)preferredLanguages;
412
+ @end
413
+ NS_SWIFT_SENDABLE
414
+ @interface AVURLAsset : AVAsset
415
+ - (instancetype)init NS_UNAVAILABLE;
416
+ + (instancetype)new NS_UNAVAILABLE;
417
+ + (instancetype)URLAssetWithURL:(NSURL *)URL options:(nullable NSDictionary<NSString *, id> *)options;
418
+ - (instancetype)initWithURL:(NSURL *)URL options:(nullable NSDictionary<NSString *, id> *)options NS_DESIGNATED_INITIALIZER;
419
+ @end
420
+ NS_ASSUME_NONNULL_END
421
+ `,
422
+ 'System/Library/Frameworks/AVFoundation.framework/Headers/AVMetadataItem.h': `#pragma once
423
+ #import <AVFoundation/AVAsynchronousKeyValueLoading.h>
424
+ #import <AVFoundation/AVMetadataFormat.h>
425
+ #import <CoreMedia/CMTime.h>
426
+ NS_ASSUME_NONNULL_BEGIN
427
+ @interface AVMetadataItem : NSObject <AVAsynchronousKeyValueLoading, NSCopying, NSMutableCopying>
428
+ @property (nonatomic, readonly) CMTime time;
429
+ @property (nonatomic, readonly) CMTime duration;
430
+ @property (nonatomic, readonly, nullable) NSString *stringValue;
431
+ @property (nonatomic, readonly, nullable) NSData *dataValue;
432
+ @property (nonatomic, readonly, copy, nullable) id<NSObject, NSCopying> value;
433
+ @property (nonatomic, readonly, copy, nullable) AVMetadataKeySpace keySpace;
434
+ @property (nonatomic, readonly, copy, nullable) NSDictionary<AVMetadataExtraAttributeKey, id> *extraAttributes;
435
+ + (NSArray<AVMetadataItem *> *)metadataItemsFromArray:(NSArray<AVMetadataItem *> *)metadataItems withKey:(nullable id)key keySpace:(nullable AVMetadataKeySpace)keySpace;
436
+ @end
437
+ NS_ASSUME_NONNULL_END
438
+ `,
439
+ 'System/Library/Frameworks/AVFoundation.framework/Headers/AVTimedMetadataGroup.h': `#pragma once
440
+ #import <AVFoundation/AVMetadataItem.h>
441
+ #import <CoreMedia/CMTimeRange.h>
442
+ NS_ASSUME_NONNULL_BEGIN
443
+ @interface AVMetadataGroup : NSObject
444
+ @property (nonatomic, readonly, copy) NSArray<AVMetadataItem *> *items;
445
+ @end
446
+ @interface AVTimedMetadataGroup : AVMetadataGroup <NSCopying, NSMutableCopying>
447
+ - (instancetype)initWithItems:(NSArray<AVMetadataItem *> *)items timeRange:(CMTimeRange)timeRange;
448
+ @property (nonatomic, readonly) CMTimeRange timeRange;
449
+ @property (nonatomic, readonly, copy) NSArray<AVMetadataItem *> *items;
450
+ @end
451
+ NS_ASSUME_NONNULL_END
452
+ `,
453
+ 'System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h': `#pragma once
454
+ #import <CoreMedia/CMTime.h>
455
+ #import <CoreMedia/CMTimeRange.h>
456
+ `,
457
+ 'System/Library/Frameworks/CoreMedia.framework/Headers/CMTime.h': `#pragma once
458
+ #import <CoreFoundation/CoreFoundation.h>
459
+ #include <stdint.h>
460
+ #pragma pack(push, 4)
461
+ typedef int64_t CMTimeValue;
462
+ typedef int32_t CMTimeScale;
463
+ typedef int64_t CMTimeEpoch;
464
+ typedef CF_OPTIONS(uint32_t, CMTimeFlags) {
465
+ kCMTimeFlags_Valid = 1UL << 0,
466
+ kCMTimeFlags_HasBeenRounded = 1UL << 1,
467
+ kCMTimeFlags_PositiveInfinity = 1UL << 2,
468
+ kCMTimeFlags_NegativeInfinity = 1UL << 3,
469
+ kCMTimeFlags_Indefinite = 1UL << 4,
470
+ kCMTimeFlags_ImpliedValueFlagsMask = kCMTimeFlags_PositiveInfinity | kCMTimeFlags_NegativeInfinity | kCMTimeFlags_Indefinite
471
+ };
472
+ typedef struct {
473
+ CMTimeValue value;
474
+ CMTimeScale timescale;
475
+ CMTimeFlags flags;
476
+ CMTimeEpoch epoch;
477
+ } CMTime;
478
+ #pragma pack(pop)
479
+ #ifdef __cplusplus
480
+ extern "C" {
481
+ #endif
482
+ CMTime CMTimeMake(int64_t value, int32_t timescale);
483
+ int32_t CMTimeCompare(CMTime time1, CMTime time2);
484
+ #ifdef __cplusplus
485
+ }
486
+ #endif
487
+ #define CMTIME_COMPARE_INLINE(time1, comparator, time2) ((Boolean)(CMTimeCompare(time1, time2) comparator 0))
488
+ `,
489
+ 'System/Library/Frameworks/CoreMedia.framework/Headers/CMTimeRange.h': `#pragma once
490
+ #import <CoreMedia/CMTime.h>
491
+ #pragma pack(push, 4)
492
+ typedef struct {
493
+ CMTime start;
494
+ CMTime duration;
495
+ } CMTimeRange;
496
+ #pragma pack(pop)
197
497
  `,
198
498
  'System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h': `#pragma once
499
+ #import <CoreFoundation/CoreFoundation.h>
199
500
  #include <stdint.h>
200
501
  #include <stdbool.h>
201
502
  #define CG_EXTERN extern
@@ -203,6 +504,70 @@ typedef const struct __attribute__((objc_bridge(NSString))) __CFString *CFString
203
504
  #define CG_EXTERN_C_BEGIN
204
505
  #define CG_EXTERN_C_END
205
506
  #define CF_SWIFT_NAME(_name) __attribute__((swift_name(#_name)))
507
+ typedef CF_ENUM (int32_t, CGBlendMode) {
508
+ kCGBlendModeNormal,
509
+ kCGBlendModeMultiply,
510
+ kCGBlendModeScreen,
511
+ kCGBlendModeOverlay,
512
+ kCGBlendModeDarken,
513
+ kCGBlendModeLighten,
514
+ kCGBlendModeColorDodge,
515
+ kCGBlendModeColorBurn,
516
+ kCGBlendModeSoftLight,
517
+ kCGBlendModeHardLight,
518
+ kCGBlendModeDifference,
519
+ kCGBlendModeExclusion,
520
+ kCGBlendModeHue,
521
+ kCGBlendModeSaturation,
522
+ kCGBlendModeColor,
523
+ kCGBlendModeLuminosity,
524
+ kCGBlendModeClear,
525
+ kCGBlendModeCopy,
526
+ kCGBlendModeSourceIn,
527
+ kCGBlendModeSourceOut,
528
+ kCGBlendModeSourceAtop,
529
+ kCGBlendModeDestinationOver,
530
+ kCGBlendModeDestinationIn,
531
+ kCGBlendModeDestinationOut,
532
+ kCGBlendModeDestinationAtop,
533
+ kCGBlendModeXOR,
534
+ kCGBlendModePlusDarker,
535
+ kCGBlendModePlusLighter
536
+ };
537
+ typedef CF_ENUM(uint32_t, CGImageComponentInfo) {
538
+ kCGImageComponentInteger = (0 << 8),
539
+ kCGImageComponentFloat = (1 << 8)
540
+ };
541
+ typedef CF_ENUM(uint32_t, CGImageByteOrderInfo) {
542
+ kCGImageByteOrderMask
543
+ = 0x7000,
544
+ kCGImageByteOrderDefault = (0 << 12),
545
+ kCGImageByteOrder16Little = (1 << 12),
546
+ kCGImageByteOrder32Little = (2 << 12),
547
+ kCGImageByteOrder16Big = (3 << 12),
548
+ kCGImageByteOrder32Big = (4 << 12),
549
+ #ifdef __BIG_ENDIAN__
550
+ kCGImageByteOrder16Host = kCGImageByteOrder16Big,
551
+ kCGImageByteOrder32Host = kCGImageByteOrder32Big
552
+ #else
553
+ kCGImageByteOrder16Host = kCGImageByteOrder16Little,
554
+ kCGImageByteOrder32Host = kCGImageByteOrder32Little
555
+ #endif
556
+ };
557
+ typedef CF_OPTIONS(uint32_t, CGBitmapInfo) {
558
+ kCGBitmapAlphaInfoMask = 0x1F,
559
+ kCGBitmapComponentInfoMask = 0xF00,
560
+ kCGBitmapByteOrderInfoMask = 0x7000,
561
+ kCGBitmapPixelFormatInfoMask = 0xF0000,
562
+ kCGBitmapFloatInfoMask = kCGBitmapComponentInfoMask,
563
+ kCGBitmapByteOrderMask = kCGBitmapByteOrderInfoMask,
564
+ kCGBitmapFloatComponents = kCGImageComponentFloat,
565
+ kCGBitmapByteOrderDefault = kCGImageByteOrderDefault,
566
+ kCGBitmapByteOrder16Little = kCGImageByteOrder16Little,
567
+ kCGBitmapByteOrder32Little = kCGImageByteOrder32Little,
568
+ kCGBitmapByteOrder16Big = kCGImageByteOrder16Big,
569
+ kCGBitmapByteOrder32Big = kCGImageByteOrder32Big
570
+ };
206
571
  typedef double CGFloat;
207
572
  struct CGPoint { CGFloat x; CGFloat y; };
208
573
  typedef struct CGPoint CGPoint;
@@ -229,8 +594,12 @@ typedef struct __attribute__((objc_bridge(id))) CGColorSpace *CGColorSpaceRef;
229
594
  #include <stdlib.h>
230
595
  #include <string.h>
231
596
  #include <time.h>
597
+ #include <limits.h>
598
+ #include <assert.h>
232
599
  #include <TargetConditionals.h>
233
600
  #import <objc/NSObject.h>
601
+ #import <dispatch/dispatch.h>
602
+ #import <CoreFoundation/CoreFoundation.h>
234
603
  #import <CoreGraphics/CoreGraphics.h>
235
604
 
236
605
  @class NSException;
@@ -253,13 +622,6 @@ typedef void NSUncaughtExceptionHandler(NSException *exception);
253
622
  #define __BEGIN_DECLS
254
623
  #define __END_DECLS
255
624
 
256
- #define CF_ENUM_ATTRIBUTES_ __attribute__((enum_extensibility(open)))
257
- #define __PEACH_ENUM_GET(_1, _2, NAME, ...) NAME
258
- #define __PEACH_NAMED_ENUM(_type, _name) enum __attribute__((enum_extensibility(open))) _name : _type _name; enum _name : _type
259
- #define __PEACH_ANON_ENUM(_type) enum __attribute__((enum_extensibility(open))) : _type
260
- #define CF_ENUM(...) __PEACH_ENUM_GET(__VA_ARGS__, __PEACH_NAMED_ENUM, __PEACH_ANON_ENUM, )(__VA_ARGS__)
261
- #define CF_CLOSED_ENUM(_type, _name) enum __attribute__((enum_extensibility(closed))) _name : _type _name; enum _name : _type
262
- #define CF_OPTIONS(_type, _name) enum __attribute__((flag_enum, enum_extensibility(open))) _name : _type _name; enum _name : _type
263
625
  #define NS_ENUM(...) CF_ENUM(__VA_ARGS__)
264
626
  #define NS_CLOSED_ENUM(_type, _name) CF_CLOSED_ENUM(_type, _name)
265
627
  #define NS_OPTIONS(_type, _name) CF_OPTIONS(_type, _name)
@@ -359,7 +721,6 @@ typedef void NSUncaughtExceptionHandler(NSException *exception);
359
721
  #define OBJC_AVAILABLE(...)
360
722
  #define OBJC_DEPRECATED(...)
361
723
  #define OBJC_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
362
- #define OBJC_ARC_UNAVAILABLE
363
724
  #define CF_AVAILABLE(...)
364
725
  #define CF_AVAILABLE_IOS(...)
365
726
  #define CF_DEPRECATED(...)
@@ -380,15 +741,28 @@ NS_ASSUME_NONNULL_BEGIN
380
741
  typedef double NSTimeInterval NS_SWIFT_NAME(TimeInterval);
381
742
  typedef uint16_t unichar;
382
743
  typedef NSUInteger NSStringEncoding;
744
+ NS_ENUM(NSStringEncoding) {
745
+ NSASCIIStringEncoding = 1,
746
+ NSUTF8StringEncoding = 4,
747
+ NSUnicodeStringEncoding = 10,
748
+ NSUTF16StringEncoding = NSUnicodeStringEncoding,
749
+ NSUTF16BigEndianStringEncoding = 0x90000100
750
+ };
383
751
  typedef struct _NSRange { NSUInteger location; NSUInteger length; } NSRange;
384
752
  typedef NSRange *NSRangePointer;
753
+ NS_INLINE NSRange NSMakeRange(NSUInteger loc, NSUInteger len) {
754
+ NSRange r;
755
+ r.location = loc;
756
+ r.length = len;
757
+ return r;
758
+ }
385
759
  typedef NS_ENUM(NSInteger, NSComparisonResult) { NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending } NS_SWIFT_NAME(ComparisonResult);
386
760
  typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
387
761
  typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions) { NSEnumerationConcurrent = (1UL << 0), NSEnumerationReverse = (1UL << 1) };
388
762
  typedef NS_OPTIONS(NSUInteger, NSSortOptions) { NSSortConcurrent = (1UL << 0), NSSortStable = (1UL << 4) };
389
763
  typedef NS_ENUM(NSInteger, NSQualityOfService) { NSQualityOfServiceUserInteractive = 0x21, NSQualityOfServiceUserInitiated = 0x19, NSQualityOfServiceUtility = 0x11, NSQualityOfServiceBackground = 0x09, NSQualityOfServiceDefault = -1 } NS_SWIFT_NAME(QualityOfService);
390
764
 
391
- @class NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSError, NSURL, NSData, NSCoder, NSSet<ObjectType>;
765
+ @class NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSError, NSURL, NSData, NSCoder, NSSet<ObjectType>, NSEnumerator<ObjectType>;
392
766
 
393
767
  @protocol NSCopying
394
768
  - (id)copyWithZone:(nullable struct _NSZone *)zone;
@@ -411,11 +785,33 @@ typedef struct { unsigned long state; id __unsafe_unretained _Nullable * _Nullab
411
785
  __attribute__((swift_bridge("Swift.String")))
412
786
  @interface NSString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
413
787
  @property (readonly) NSUInteger length;
788
+ @property (readonly) NSInteger integerValue;
789
+ @property (readonly) const char *fileSystemRepresentation NS_RETURNS_INNER_POINTER;
790
+ @property (nullable, readonly) const char *UTF8String NS_RETURNS_INNER_POINTER;
791
+ @property (nullable, readonly, copy) NSString *stringByRemovingPercentEncoding;
414
792
  - (unichar)characterAtIndex:(NSUInteger)index;
793
+ - (BOOL)isEqualToString:(NSString *)aString;
794
+ - (BOOL)containsString:(NSString *)str;
795
+ @property (readonly, copy) NSString *lowercaseString;
796
+ - (NSString *)stringByAppendingString:(NSString *)aString;
797
+ - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement;
798
+ - (instancetype)initWithString:(NSString *)aString NS_FORMAT_ARGUMENT(1);
799
+ - (instancetype)initWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
800
+ + (instancetype)stringWithString:(NSString *)string NS_FORMAT_ARGUMENT(1);
801
+ - (NSArray<NSString *> *)componentsSeparatedByString:(NSString *)separator;
802
+ - (NSString *)stringByAppendingPathComponent:(NSString *)str;
803
+ - (nullable instancetype)initWithData:(NSData *)data encoding:(NSStringEncoding)encoding;
804
+ - (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding;
805
+ - (nullable instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding;
806
+ + (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
807
+ + (instancetype)stringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
415
808
  - (instancetype)init NS_DESIGNATED_INITIALIZER;
416
809
  - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
417
810
  @end
418
811
  @interface NSMutableString : NSString
812
+ - (void)appendString:(NSString *)aString;
813
+ - (void)appendFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
814
+ + (NSMutableString *)stringWithCapacity:(NSUInteger)capacity;
419
815
  @end
420
816
  @interface NSAttributedString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
421
817
  @property (readonly, copy) NSString *string;
@@ -427,34 +823,103 @@ typedef NSString *NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(N
427
823
  __attribute__((swift_bridge("Swift.Array")))
428
824
  @interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
429
825
  @property (readonly) NSUInteger count;
826
+ @property (nullable, nonatomic, readonly) ObjectType firstObject;
430
827
  - (ObjectType)objectAtIndex:(NSUInteger)index;
828
+ - (NSString *)componentsJoinedByString:(NSString *)separator;
829
+ - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx;
830
+ - (BOOL)containsObject:(ObjectType)anObject;
831
+ - (NSArray<ObjectType> *)subarrayWithRange:(NSRange)range;
832
+ - (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator NS_NOESCAPE)cmptr;
833
+ - (NSEnumerator<ObjectType> *)objectEnumerator;
834
+ - (instancetype)initWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
835
+ + (instancetype)array;
836
+ + (instancetype)arrayWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt;
837
+ + (instancetype)arrayWithArray:(NSArray<ObjectType> *)array;
431
838
  @end
432
839
  @interface NSMutableArray<ObjectType> : NSArray<ObjectType>
840
+ - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
841
+ - (void)addObject:(ObjectType)anObject;
842
+ - (void)addObjectsFromArray:(NSArray<ObjectType> *)otherArray;
433
843
  @end
434
844
  __attribute__((swift_bridge("Swift.Dictionary")))
435
845
  @interface NSDictionary<__covariant KeyType, __covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
436
846
  @property (readonly) NSUInteger count;
847
+ - (nullable ObjectType)objectForKey:(KeyType)aKey;
848
+ - (nullable ObjectType)objectForKeyedSubscript:(KeyType)key;
849
+ - (unsigned long long)fileSize;
850
+ @property (readonly, copy) NSArray<KeyType> *allKeys;
851
+ - (NSEnumerator<KeyType> *)keyEnumerator;
852
+ - (NSEnumerator<ObjectType> *)objectEnumerator;
853
+ - (NSArray<ObjectType> *)objectsForKeys:(NSArray<KeyType> *)keys notFoundMarker:(ObjectType)marker;
854
+ - (void)enumerateKeysAndObjectsUsingBlock:(void (NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))block;
855
+ + (instancetype)dictionary;
856
+ + (instancetype)dictionaryWithDictionary:(NSDictionary<KeyType, ObjectType> *)dict;
857
+ - (instancetype)initWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
858
+ + (instancetype)dictionaryWithObject:(ObjectType)object forKey:(KeyType <NSCopying>)key;
859
+ + (instancetype)dictionaryWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType <NSCopying> _Nonnull [_Nullable])keys count:(NSUInteger)cnt;
860
+ + (instancetype)dictionaryWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
437
861
  @end
438
862
  @interface NSMutableDictionary<KeyType, ObjectType> : NSDictionary<KeyType, ObjectType>
863
+ - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
864
+ + (instancetype)dictionaryWithCapacity:(NSUInteger)numItems;
865
+ - (void)setObject:(ObjectType)anObject forKey:(KeyType <NSCopying>)aKey;
866
+ - (void)setObject:(nullable ObjectType)obj forKeyedSubscript:(KeyType <NSCopying>)key;
867
+ - (void)removeAllObjects;
439
868
  @end
440
869
  __attribute__((swift_bridge("Swift.Set")))
441
870
  @interface NSSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
442
871
  @property (readonly) NSUInteger count;
872
+ + (instancetype)set;
873
+ - (nullable ObjectType)anyObject;
874
+ - (void)makeObjectsPerformSelector:(SEL)aSelector NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
875
+ - (NSSet<ObjectType> *)objectsPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, BOOL *stop))predicate;
443
876
  @end
444
877
  @interface NSMutableSet<ObjectType> : NSSet<ObjectType>
878
+ - (void)addObject:(ObjectType)object;
879
+ - (void)removeObject:(ObjectType)object;
445
880
  @end
446
881
  @interface NSOrderedSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
447
882
  @end
448
883
  @interface NSMutableOrderedSet<ObjectType> : NSOrderedSet<ObjectType>
449
884
  @end
450
885
  @interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
886
+ - (nullable ObjectType)nextObject;
451
887
  @end
452
888
  @interface NSValue : NSObject <NSCopying, NSSecureCoding>
889
+ @property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
890
+ @property (nullable, readonly) void *pointerValue;
891
+ + (NSValue *)valueWithNonretainedObject:(nullable id)anObject;
453
892
  @end
454
893
  @interface NSNumber : NSValue
455
894
  @property (readonly) BOOL boolValue;
456
895
  @property (readonly) NSInteger integerValue;
457
896
  @property (readonly) double doubleValue;
897
+ @property (readonly) char charValue;
898
+ @property (readonly) unsigned char unsignedCharValue;
899
+ @property (readonly) short shortValue;
900
+ @property (readonly) unsigned short unsignedShortValue;
901
+ @property (readonly) int intValue;
902
+ @property (readonly) unsigned int unsignedIntValue;
903
+ @property (readonly) long longValue;
904
+ @property (readonly) unsigned long unsignedLongValue;
905
+ @property (readonly) long long longLongValue;
906
+ @property (readonly) unsigned long long unsignedLongLongValue;
907
+ @property (readonly) float floatValue;
908
+ + (NSNumber *)numberWithChar:(char)value;
909
+ + (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
910
+ + (NSNumber *)numberWithShort:(short)value;
911
+ + (NSNumber *)numberWithUnsignedShort:(unsigned short)value;
912
+ + (NSNumber *)numberWithInt:(int)value;
913
+ + (NSNumber *)numberWithUnsignedInt:(unsigned int)value;
914
+ + (NSNumber *)numberWithLong:(long)value;
915
+ + (NSNumber *)numberWithUnsignedLong:(unsigned long)value;
916
+ + (NSNumber *)numberWithLongLong:(long long)value;
917
+ + (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value;
918
+ + (NSNumber *)numberWithFloat:(float)value;
919
+ + (NSNumber *)numberWithDouble:(double)value;
920
+ + (NSNumber *)numberWithBool:(BOOL)value;
921
+ + (NSNumber *)numberWithInteger:(NSInteger)value;
922
+ + (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value;
458
923
  @end
459
924
  __attribute__((swift_bridge("Decimal")))
460
925
  @interface NSDecimalNumber : NSNumber
@@ -462,15 +927,47 @@ __attribute__((swift_bridge("Decimal")))
462
927
  @interface NSNull : NSObject <NSCopying, NSSecureCoding>
463
928
  + (NSNull *)null;
464
929
  @end
930
+ typedef NS_OPTIONS(NSUInteger, NSDataReadingOptions) {
931
+ NSDataReadingMappedIfSafe = 1UL << 0,
932
+ NSDataReadingUncached = 1UL << 1,
933
+ NSDataReadingMappedAlways = 1UL << 3,
934
+ NSDataReadingMapped = NSDataReadingMappedIfSafe,
935
+ NSMappedRead = NSDataReadingMapped,
936
+ NSUncachedRead = NSDataReadingUncached
937
+ };
938
+ typedef NS_OPTIONS(NSUInteger, NSDataWritingOptions) {
939
+ NSDataWritingAtomic = 1UL << 0,
940
+ NSDataWritingWithoutOverwriting = 1UL << 1,
941
+ NSDataWritingFileProtectionNone = 0x10000000,
942
+ NSDataWritingFileProtectionComplete = 0x20000000,
943
+ NSDataWritingFileProtectionCompleteUnlessOpen = 0x30000000,
944
+ NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = 0x40000000,
945
+ NSDataWritingFileProtectionCompleteWhenUserInactive = 0x50000000,
946
+ NSDataWritingFileProtectionMask = 0xf0000000,
947
+ NSAtomicWrite = NSDataWritingAtomic
948
+ };
949
+ typedef NS_OPTIONS(NSUInteger, NSDataSearchOptions) {
950
+ NSDataSearchBackwards = 1UL << 0,
951
+ NSDataSearchAnchored = 1UL << 1
952
+ };
465
953
  __attribute__((swift_bridge("Data")))
466
954
  @interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
467
955
  @property (readonly) NSUInteger length;
956
+ @property (readonly) const void *bytes NS_RETURNS_INNER_POINTER;
957
+ + (instancetype)dataWithBytes:(nullable const void *)bytes length:(NSUInteger)length;
958
+ + (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
959
+ - (NSData *)subdataWithRange:(NSRange)range;
960
+ - (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange;
468
961
  @end
469
962
  @interface NSMutableData : NSData
963
+ - (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
470
964
  @end
471
965
  __attribute__((swift_bridge("Date")))
472
966
  @interface NSDate : NSObject <NSCopying, NSSecureCoding>
473
967
  @property (readonly) NSTimeInterval timeIntervalSinceReferenceDate;
968
+ @property (readonly) NSTimeInterval timeIntervalSince1970;
969
+ @property (class, readonly) NSTimeInterval timeIntervalSinceReferenceDate;
970
+ + (instancetype)dateWithTimeIntervalSince1970:(NSTimeInterval)secs;
474
971
  @end
475
972
  __attribute__((swift_bridge("DateComponents")))
476
973
  @interface NSDateComponents : NSObject <NSCopying, NSSecureCoding>
@@ -480,6 +977,8 @@ __attribute__((swift_bridge("DateInterval")))
480
977
  @end
481
978
  __attribute__((swift_bridge("URL")))
482
979
  @interface NSURL : NSObject <NSCopying, NSSecureCoding>
980
+ @property (nullable, readonly, copy) NSString *path;
981
+ + (NSURL *)fileURLWithPath:(NSString *)path;
483
982
  @end
484
983
  __attribute__((swift_bridge("URLComponents")))
485
984
  @interface NSURLComponents : NSObject <NSCopying>
@@ -498,12 +997,24 @@ NS_SWIFT_NAME(URLResponse)
498
997
  NS_SWIFT_NAME(HTTPURLResponse)
499
998
  @interface NSHTTPURLResponse : NSURLResponse
500
999
  @end
1000
+ NS_SWIFT_NAME(URLSessionDelegate)
1001
+ @protocol NSURLSessionDelegate <NSObject>
1002
+ @end
1003
+ NS_SWIFT_NAME(URLSessionTaskDelegate)
1004
+ @protocol NSURLSessionTaskDelegate <NSURLSessionDelegate>
1005
+ @end
1006
+ NS_SWIFT_NAME(URLSessionDataDelegate)
1007
+ @protocol NSURLSessionDataDelegate <NSURLSessionTaskDelegate>
1008
+ @end
501
1009
  NS_SWIFT_NAME(URLSession)
502
1010
  @interface NSURLSession : NSObject
503
1011
  @end
504
1012
  NS_SWIFT_NAME(URLSessionTask)
505
1013
  @interface NSURLSessionTask : NSObject <NSCopying>
506
1014
  @end
1015
+ NS_SWIFT_NAME(URLSessionTaskMetrics)
1016
+ @interface NSURLSessionTaskMetrics : NSObject
1017
+ @end
507
1018
  NS_SWIFT_NAME(URLSessionDataTask)
508
1019
  @interface NSURLSessionDataTask : NSURLSessionTask
509
1020
  @end
@@ -529,9 +1040,13 @@ __attribute__((swift_bridge("CharacterSet")))
529
1040
  @end
530
1041
  __attribute__((swift_bridge("Locale")))
531
1042
  @interface NSLocale : NSObject <NSCopying, NSSecureCoding>
1043
+ @property (readonly, copy) NSString *localeIdentifier;
1044
+ - (instancetype)initWithLocaleIdentifier:(NSString *)string NS_DESIGNATED_INITIALIZER;
1045
+ @property (class, readonly, copy) NSArray<NSString *> *preferredLanguages;
532
1046
  @end
533
1047
  __attribute__((swift_bridge("TimeZone")))
534
1048
  @interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
1049
+ + (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
535
1050
  @end
536
1051
  __attribute__((swift_bridge("Calendar")))
537
1052
  @interface NSCalendar : NSObject <NSCopying, NSSecureCoding>
@@ -545,16 +1060,39 @@ NS_SWIFT_NAME(NotificationCenter)
545
1060
  @property (class, readonly, strong) NSNotificationCenter *defaultCenter;
546
1061
  @end
547
1062
  typedef NSString *NSErrorDomain;
548
- typedef NSString *NSErrorUserInfoKey NS_TYPED_EXTENSIBLE_ENUM;
1063
+ typedef NSString *NSFileAttributeKey NS_TYPED_EXTENSIBLE_ENUM;
1064
+ typedef NSString *NSFileProtectionType NS_TYPED_EXTENSIBLE_ENUM;
1065
+ typedef NSString *NSErrorUserInfoKey;
1066
+ FOUNDATION_EXPORT NSErrorDomain const NSCocoaErrorDomain;
1067
+ FOUNDATION_EXPORT NSErrorUserInfoKey const NSLocalizedDescriptionKey;
549
1068
  __attribute__((swift_bridge("Swift.Error")))
550
1069
  @interface NSError : NSObject <NSCopying, NSSecureCoding>
1070
+ + (instancetype)errorWithDomain:(NSErrorDomain)domain code:(NSInteger)code userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)dict;
1071
+ - (instancetype)initWithDomain:(NSErrorDomain)domain code:(NSInteger)code userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)dict NS_DESIGNATED_INITIALIZER;
551
1072
  @property (readonly, copy) NSErrorDomain domain;
552
1073
  @property (readonly) NSInteger code;
553
1074
  @property (readonly, copy) NSDictionary<NSErrorUserInfoKey, id> *userInfo;
554
1075
  @end
1076
+ typedef NSString *NSExceptionName NS_TYPED_EXTENSIBLE_ENUM;
555
1077
  @interface NSException : NSObject <NSCopying, NSSecureCoding>
1078
+ @property (readonly, copy) NSExceptionName name;
1079
+ @property (nullable, readonly, copy) NSDictionary *userInfo;
1080
+ @end
1081
+ @interface NSAssertionHandler : NSObject
1082
+ @property (class, readonly, strong) NSAssertionHandler *currentHandler;
1083
+ - (void)handleFailureInMethod:(SEL)selector object:(id)object file:(NSString *)fileName lineNumber:(NSInteger)line description:(nullable NSString *)format, ... NS_FORMAT_FUNCTION(5,6);
1084
+ @end
1085
+ #if !defined(NS_BLOCK_ASSERTIONS)
1086
+ #define __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \\"-Wformat-extra-args\\"")
1087
+ #define __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS _Pragma("clang diagnostic pop")
1088
+ #define NSAssert(condition, desc, ...) do { __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS if (__builtin_expect(!(condition), 0)) { [[NSAssertionHandler currentHandler] handleFailureInMethod:_cmd object:self file:@(__FILE_NAME__) lineNumber:__LINE__ description:(desc), ##__VA_ARGS__]; } __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS } while (0)
1089
+ #else
1090
+ #define NSAssert(condition, desc, ...) do {} while (0)
1091
+ #endif
1092
+ #define NSParameterAssert(condition) NSAssert((condition), @"Invalid parameter not satisfying: %@", @#condition)
1093
+ @interface NSObject (NSKeyValueCoding)
1094
+ - (void)setValue:(nullable id)value forKey:(NSString *)key;
556
1095
  @end
557
- typedef NSString *NSExceptionName NS_TYPED_EXTENSIBLE_ENUM;
558
1096
  NS_SWIFT_NAME(Bundle)
559
1097
  @interface NSBundle : NSObject
560
1098
  @property (class, readonly, strong) NSBundle *mainBundle;
@@ -584,6 +1122,9 @@ NS_SWIFT_NAME(Timer)
584
1122
  @end
585
1123
  NS_SWIFT_NAME(FileManager)
586
1124
  @interface NSFileManager : NSObject
1125
+ @property (class, readonly, strong) NSFileManager *defaultManager;
1126
+ - (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error;
1127
+ - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error;
587
1128
  @end
588
1129
  NS_SWIFT_NAME(ProcessInfo)
589
1130
  @interface NSProcessInfo : NSObject
@@ -593,14 +1134,26 @@ NS_SWIFT_NAME(ProcessInfo)
593
1134
  NS_SWIFT_NAME(NSKeyedArchiver)
594
1135
  @interface NSKeyedArchiver : NSCoder
595
1136
  @end
1137
+ NS_SWIFT_NAME(Stream)
1138
+ @interface NSStream : NSObject
1139
+ - (void)open;
1140
+ - (void)close;
1141
+ @end
596
1142
  NS_SWIFT_NAME(InputStream)
597
- @interface NSInputStream : NSObject
1143
+ @interface NSInputStream : NSStream
1144
+ + (nullable instancetype)inputStreamWithData:(NSData *)data;
1145
+ - (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len;
598
1146
  @end
599
1147
  NS_SWIFT_NAME(OutputStream)
600
- @interface NSOutputStream : NSObject
1148
+ @interface NSOutputStream : NSStream
601
1149
  @end
602
1150
  NS_SWIFT_NAME(DateFormatter)
603
1151
  @interface NSDateFormatter : NSObject
1152
+ @property (null_resettable, copy) NSString *dateFormat;
1153
+ @property (null_resettable, copy) NSLocale *locale;
1154
+ @property (null_resettable, copy) NSTimeZone *timeZone;
1155
+ - (NSString *)stringFromDate:(NSDate *)date;
1156
+ - (nullable NSDate *)dateFromString:(NSString *)string;
604
1157
  @end
605
1158
  NS_SWIFT_NAME(NumberFormatter)
606
1159
  @interface NSNumberFormatter : NSObject
@@ -612,7 +1165,11 @@ NS_SWIFT_NAME(JSONSerialization)
612
1165
  @end
613
1166
  @interface NSSortDescriptor : NSObject <NSSecureCoding, NSCopying>
614
1167
  @end
615
- @interface NSLock : NSObject
1168
+ @protocol NSLocking
1169
+ - (void)lock NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use async-safe scoped locking instead");
1170
+ - (void)unlock NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use async-safe scoped locking instead");
1171
+ @end
1172
+ @interface NSLock : NSObject <NSLocking>
616
1173
  @end
617
1174
  @interface NSCache<KeyType, ObjectType> : NSObject
618
1175
  @end
@@ -637,17 +1194,88 @@ FOUNDATION_EXPORT NSString *NSStringFromClass(Class aClass);
637
1194
  FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2) NS_SWIFT_UNAVAILABLE("Use print or os_log");
638
1195
 
639
1196
  NS_ASSUME_NONNULL_END
1197
+ `,
1198
+ 'System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h': `#pragma once
1199
+ #import <Foundation/Foundation.h>
1200
+ @interface CAMediaTimingFunction : NSObject <NSSecureCoding>
1201
+ @end
1202
+ `,
1203
+ 'System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h': `#pragma once
1204
+ #import <Foundation/Foundation.h>
1205
+ @interface CIFilter : NSObject <NSSecureCoding, NSCopying>
1206
+ @end
1207
+ `,
1208
+ 'System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h': `#pragma once
1209
+ #import <Foundation/Foundation.h>
1210
+ typedef CF_CLOSED_ENUM(uint32_t, CGImagePropertyOrientation) {
1211
+ kCGImagePropertyOrientationUp = 1,
1212
+ kCGImagePropertyOrientationUpMirrored,
1213
+ kCGImagePropertyOrientationDown,
1214
+ kCGImagePropertyOrientationDownMirrored,
1215
+ kCGImagePropertyOrientationLeftMirrored,
1216
+ kCGImagePropertyOrientationRight,
1217
+ kCGImagePropertyOrientationRightMirrored,
1218
+ kCGImagePropertyOrientationLeft
1219
+ };
1220
+ `,
1221
+ 'System/Library/Frameworks/UIKit.framework/Headers/UIColor.h': `#pragma once
1222
+ #import <UIKit/UIKit.h>
1223
+ `,
1224
+ 'System/Library/Frameworks/UIKit.framework/Headers/UIAppearance.h': `#pragma once
1225
+ #import <Foundation/Foundation.h>
1226
+ #define UI_APPEARANCE_SELECTOR __attribute__((annotate("ui_appearance_selector")))
1227
+ NS_SWIFT_UI_ACTOR @protocol UIAppearance <NSObject>
1228
+ @end
640
1229
  `,
641
1230
  'System/Library/Frameworks/UIKit.framework/Headers/UIKit.h': `#pragma once
642
1231
  #import <Foundation/Foundation.h>
1232
+ #import <UIKit/UIAppearance.h>
1233
+ #import <QuartzCore/QuartzCore.h>
1234
+ #import <CoreImage/CoreImage.h>
643
1235
  #define UIKIT_EXTERN extern
644
1236
  #define UIKIT_STATIC_INLINE static inline
645
1237
  #define UIKIT_AVAILABLE_TVOS_ONLY(...)
646
1238
  #define UIKIT_SWIFT_FORWARD_DECLARE(...)
647
1239
  NS_ASSUME_NONNULL_BEGIN
1240
+ typedef NS_OPTIONS(NSUInteger, UIRectCorner) {
1241
+ UIRectCornerTopLeft = 1 << 0,
1242
+ UIRectCornerTopRight = 1 << 1,
1243
+ UIRectCornerBottomLeft = 1 << 2,
1244
+ UIRectCornerBottomRight = 1 << 3,
1245
+ UIRectCornerAllCorners = ~0UL
1246
+ };
1247
+ typedef NS_OPTIONS(NSUInteger, UIViewAnimationOptions) {
1248
+ UIViewAnimationOptionLayoutSubviews = 1 << 0,
1249
+ UIViewAnimationOptionAllowUserInteraction = 1 << 1,
1250
+ UIViewAnimationOptionBeginFromCurrentState = 1 << 2,
1251
+ UIViewAnimationOptionRepeat = 1 << 3,
1252
+ UIViewAnimationOptionAutoreverse = 1 << 4,
1253
+ UIViewAnimationOptionOverrideInheritedDuration = 1 << 5,
1254
+ UIViewAnimationOptionOverrideInheritedCurve = 1 << 6,
1255
+ UIViewAnimationOptionAllowAnimatedContent = 1 << 7,
1256
+ UIViewAnimationOptionShowHideTransitionViews = 1 << 8,
1257
+ UIViewAnimationOptionOverrideInheritedOptions = 1 << 9,
1258
+ UIViewAnimationOptionCurveEaseInOut = 0 << 16,
1259
+ UIViewAnimationOptionCurveEaseIn = 1 << 16,
1260
+ UIViewAnimationOptionCurveEaseOut = 2 << 16,
1261
+ UIViewAnimationOptionCurveLinear = 3 << 16,
1262
+ UIViewAnimationOptionTransitionNone = 0 << 20,
1263
+ UIViewAnimationOptionTransitionFlipFromLeft = 1 << 20,
1264
+ UIViewAnimationOptionTransitionFlipFromRight = 2 << 20,
1265
+ UIViewAnimationOptionTransitionCurlUp = 3 << 20,
1266
+ UIViewAnimationOptionTransitionCurlDown = 4 << 20,
1267
+ UIViewAnimationOptionTransitionCrossDissolve = 5 << 20,
1268
+ UIViewAnimationOptionTransitionFlipFromTop = 6 << 20,
1269
+ UIViewAnimationOptionTransitionFlipFromBottom = 7 << 20,
1270
+ UIViewAnimationOptionPreferredFramesPerSecondDefault = 0 << 24,
1271
+ UIViewAnimationOptionPreferredFramesPerSecond60 = 3 << 24,
1272
+ UIViewAnimationOptionPreferredFramesPerSecond30 = 7 << 24,
1273
+ UIViewAnimationOptionFlushUpdates = 1 << 28,
1274
+ } NS_SWIFT_NAME(UIView.AnimationOptions);
648
1275
  typedef struct UIEdgeInsets { CGFloat top, left, bottom, right; } UIEdgeInsets;
649
1276
  typedef struct NSDirectionalEdgeInsets { CGFloat top, leading, bottom, trailing; } NSDirectionalEdgeInsets;
650
1277
  typedef struct UIOffset { CGFloat horizontal, vertical; } UIOffset;
1278
+ typedef NS_ENUM(NSInteger, UIImageOrientation) { UIImageOrientationUp, UIImageOrientationDown, UIImageOrientationLeft, UIImageOrientationRight, UIImageOrientationUpMirrored, UIImageOrientationDownMirrored, UIImageOrientationLeftMirrored, UIImageOrientationRightMirrored } NS_SWIFT_NAME(UIImage.Orientation);
651
1279
  typedef NS_ENUM(NSInteger, UIViewContentMode) { UIViewContentModeScaleToFill, UIViewContentModeScaleAspectFit, UIViewContentModeScaleAspectFill } NS_SWIFT_NAME(UIView.ContentMode);
652
1280
  typedef NS_OPTIONS(NSUInteger, UIControlState) { UIControlStateNormal = 0, UIControlStateHighlighted = 1 << 0, UIControlStateDisabled = 1 << 1, UIControlStateSelected = 1 << 2 } NS_SWIFT_NAME(UIControl.State);
653
1281
  typedef NS_OPTIONS(NSUInteger, UIControlEvents) { UIControlEventTouchDown = 1 << 0, UIControlEventTouchUpInside = 1 << 6, UIControlEventValueChanged = 1 << 12, UIControlEventPrimaryActionTriggered = 1 << 13 } NS_SWIFT_NAME(UIControl.Event);
@@ -656,8 +1284,10 @@ typedef NS_OPTIONS(NSUInteger, UIInterfaceOrientationMask) { UIInterfaceOrientat
656
1284
  typedef NS_ENUM(NSInteger, UIInterfaceOrientation) { UIInterfaceOrientationUnknown = 0, UIInterfaceOrientationPortrait = 1, UIInterfaceOrientationPortraitUpsideDown = 2, UIInterfaceOrientationLandscapeLeft = 4, UIInterfaceOrientationLandscapeRight = 3 };
657
1285
  typedef NS_ENUM(NSInteger, UIModalPresentationStyle) { UIModalPresentationFullScreen = 0, UIModalPresentationPageSheet = 1, UIModalPresentationFormSheet = 2, UIModalPresentationOverFullScreen = 5, UIModalPresentationAutomatic = -2 };
658
1286
  typedef NS_ENUM(NSInteger, UIUserInterfaceStyle) { UIUserInterfaceStyleUnspecified, UIUserInterfaceStyleLight, UIUserInterfaceStyleDark };
659
- @class UIView, UIViewController, UIWindow, UIColor, UIImage, UIFont, UIEvent, UITouch, UIScreen, UIWindowScene, UIGestureRecognizer;
660
- NS_SWIFT_UI_ACTOR @protocol UIAppearance <NSObject>
1287
+ @class UIView, UIViewController, UIWindow, UIColor, UIImage, UIFont, UIEvent, UITouch, UIPress, UIScreen, UIWindowScene, UIGestureRecognizer;
1288
+ @interface UIGraphicsRendererFormat : NSObject <NSCopying>
1289
+ @end
1290
+ @interface UIGraphicsImageRendererFormat : UIGraphicsRendererFormat
661
1291
  @end
662
1292
  NS_SWIFT_UI_ACTOR @protocol UICoordinateSpace <NSObject>
663
1293
  @end
@@ -705,12 +1335,26 @@ NS_SWIFT_UI_ACTOR @interface UIButton : UIControl
705
1335
  @end
706
1336
  NS_SWIFT_UI_ACTOR @interface UILabel : UIView
707
1337
  @end
1338
+ NS_SWIFT_UI_ACTOR @interface UIProgressView : UIView <NSCoding>
1339
+ @end
708
1340
  NS_SWIFT_UI_ACTOR @interface UIImageView : UIView
709
1341
  @end
710
1342
  NS_SWIFT_UI_ACTOR @interface UIScrollView : UIView
711
1343
  @end
712
1344
  NS_SWIFT_UI_ACTOR @interface UITableView : UIScrollView
713
1345
  @end
1346
+ NS_SWIFT_UI_ACTOR @protocol UIGestureRecognizerDelegate <NSObject>
1347
+ @optional
1348
+ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer;
1349
+ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
1350
+ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer __attribute__((availability(ios,introduced=7.0)));
1351
+ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer __attribute__((availability(ios,introduced=7.0)));
1352
+ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch;
1353
+ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceivePress:(UIPress *)press;
1354
+ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveEvent:(UIEvent *)event __attribute__((availability(ios,introduced=13.4), availability(tvos,introduced=13.4)));
1355
+ @end
1356
+ __attribute__((availability(ios,introduced=2.0))) NS_SWIFT_UI_ACTOR @interface UITableViewCell : UIView <NSCoding, UIGestureRecognizerDelegate>
1357
+ @end
714
1358
  NS_SWIFT_UI_ACTOR @interface UICollectionView : UIScrollView
715
1359
  @end
716
1360
  NS_SWIFT_UI_ACTOR @interface UITextField : UIControl
@@ -743,13 +1387,25 @@ NS_SWIFT_UI_ACTOR @interface UITouch : NSObject
743
1387
  + (UIColor *)colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
744
1388
  @end
745
1389
  @interface UIImage : NSObject <NSSecureCoding>
1390
+ @property (nonatomic, readonly) CGSize size;
746
1391
  + (nullable UIImage *)imageNamed:(NSString *)name;
1392
+ + (nullable UIImage *)imageWithData:(NSData *)data;
747
1393
  @end
748
1394
  @interface UIFont : NSObject <NSCopying, NSSecureCoding>
749
1395
  @end
750
1396
  @interface UIBezierPath : NSObject <NSCopying, NSSecureCoding>
751
1397
  @end
752
1398
  NS_ASSUME_NONNULL_END
1399
+ `,
1400
+ 'System/Library/Frameworks/AVFoundation.framework/Modules/module.modulemap': `framework module AVFoundation [system] {
1401
+ umbrella header "AVFoundation.h"
1402
+ export *
1403
+ }
1404
+ `,
1405
+ 'System/Library/Frameworks/CoreMedia.framework/Modules/module.modulemap': `framework module CoreMedia [system] {
1406
+ umbrella header "CoreMedia.h"
1407
+ export *
1408
+ }
753
1409
  `,
754
1410
  'System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap': `framework module CoreGraphics [system] {
755
1411
  umbrella header "CoreGraphics.h"
@@ -760,6 +1416,21 @@ NS_ASSUME_NONNULL_END
760
1416
  umbrella header "Foundation.h"
761
1417
  export *
762
1418
  }
1419
+ `,
1420
+ 'System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap': `framework module QuartzCore [system] {
1421
+ umbrella header "QuartzCore.h"
1422
+ export *
1423
+ }
1424
+ `,
1425
+ 'System/Library/Frameworks/CoreImage.framework/Modules/module.modulemap': `framework module CoreImage [system] {
1426
+ umbrella header "CoreImage.h"
1427
+ export *
1428
+ }
1429
+ `,
1430
+ 'System/Library/Frameworks/ImageIO.framework/Modules/module.modulemap': `framework module ImageIO [system] {
1431
+ umbrella header "ImageIO.h"
1432
+ export *
1433
+ }
763
1434
  `,
764
1435
  'System/Library/Frameworks/UIKit.framework/Modules/module.modulemap': `framework module UIKit [system] {
765
1436
  umbrella header "UIKit.h"