peachsim 0.1.1684 → 0.1.1692

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 (254) hide show
  1. package/cli/commands/coverage-swift.ts +72 -5
  2. package/cli/commands/inspect/actions.ts +1 -0
  3. package/cli/commands/screenshot.ts +12 -0
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +2252 -1462
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +1762 -995
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +2184 -1417
  34. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +175 -69
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +174 -68
  50. package/dist-lib/native-app-identity-project.cjs +163 -51
  51. package/dist-lib/native-app-identity-project.mjs +206 -82
  52. package/dist-lib/native-app-identity.cjs +1 -1
  53. package/dist-lib/native-app-identity.mjs +1 -1
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +26 -23
  61. package/dist-lib/public-origins-lib.json +74 -61
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +2 -2
  67. package/dist-lib/sdk.mjs +2 -2
  68. package/dist-lib/skills.cjs +2633 -1840
  69. package/dist-lib/swift-compile.cjs +2478 -100
  70. package/dist-lib/swift-compile.mjs +2475 -100
  71. package/dist-lib/swift-package.cjs +108 -50
  72. package/dist-lib/swift-package.mjs +104 -50
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +3979 -985
  78. package/dist-lib/vite.cjs +12 -18
  79. package/dist-lib/worklet-executable.cjs +7 -4
  80. package/dist-lib/worklet-executable.mjs +7 -4
  81. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +15 -1
  82. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +6 -0
  83. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  84. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
  85. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  86. package/package.json +1 -1
  87. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +9 -0
  88. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
  89. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
  90. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
  91. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
  92. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
  93. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
  94. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
  95. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
  96. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
  97. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
  98. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
  99. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
  100. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
  101. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
  102. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
  103. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
  104. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
  105. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
  106. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
  107. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
  108. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
  109. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
  110. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
  111. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
  112. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
  113. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
  114. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
  115. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
  116. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
  117. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
  118. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +96 -2
  119. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
  120. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
  121. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
  122. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
  123. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
  124. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
  125. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
  126. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
  127. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
  128. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
  129. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
  130. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
  131. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
  132. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
  133. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
  134. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
  135. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
  136. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
  137. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
  138. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
  139. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
  140. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
  141. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
  142. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
  143. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
  144. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
  145. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
  146. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
  147. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
  148. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
  149. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
  150. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
  151. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
  152. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
  153. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
  154. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
  155. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
  156. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
  157. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
  158. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
  159. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
  160. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
  161. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
  162. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
  163. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
  164. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
  165. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
  166. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
  167. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
  168. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
  169. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
  170. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
  171. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
  172. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
  173. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
  174. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
  175. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
  176. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
  177. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
  178. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
  179. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
  180. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
  181. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
  182. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
  183. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
  184. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
  185. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
  186. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
  187. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
  188. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
  189. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
  190. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
  191. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
  192. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
  193. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
  194. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
  195. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
  196. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
  197. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
  198. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
  199. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
  200. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
  201. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
  202. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
  203. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
  204. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
  205. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
  206. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
  207. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
  208. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
  209. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
  210. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
  211. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
  212. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
  213. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
  214. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
  215. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
  216. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
  217. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
  218. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
  219. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
  220. package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
  221. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
  222. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
  223. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
  224. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
  225. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
  226. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
  227. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
  228. package/sdk/ios/usr/include/complex.h +167 -0
  229. package/sdk/ios/usr/include/dispatch/dispatch.h +5 -0
  230. package/sdk/ios/usr/include/mach/mach_types.h +1 -0
  231. package/sdk/ios/usr/include/math.h +835 -2
  232. package/sdk/ios/usr/include/sys/cdefs.h +0 -1
  233. package/src/generated/swift-c-predefines.json +1988 -0
  234. package/src/nitro-bundle.ts +1 -0
  235. package/src/nitro-compile.ts +4 -0
  236. package/src/nitroContract.ts +18 -2
  237. package/src/swift-compile.ts +446 -49
  238. package/src/swift-coverage/package.ts +3 -1
  239. package/src/swift-coverage/xcode-assets.ts +62 -2
  240. package/src/swift-coverage/xcode-packages.ts +11 -6
  241. package/src/swift-host.ts +333 -57
  242. package/src/swift-objc-compile.ts +20 -5
  243. package/src/swift-objc-standin.ts +21 -11
  244. package/src/swift-package-manifest.ts +151 -28
  245. package/src/swift-package.ts +134 -58
  246. package/src/swift-packages.ts +141 -44
  247. package/src/swift-source-file.ts +10 -15
  248. package/src/swift-standins.ts +87 -13
  249. package/src/swift-submit.ts +5 -0
  250. package/src/swiftContract.ts +160 -75
  251. package/src/target-matcher.ts +15 -2
  252. package/src/worklet-executable.ts +7 -3
  253. package/src/xcode-json-project.ts +14 -2
  254. package/src/xcode-project.ts +154 -59
@@ -0,0 +1,225 @@
1
+ /*
2
+ * CLLocationManagerDelegate.h
3
+ * CoreLocation
4
+ *
5
+ * Copyright (c) 2008-2010 Apple Inc. All rights reserved.
6
+ *
7
+ */
8
+
9
+ #import <Availability.h>
10
+ #import <Foundation/Foundation.h>
11
+ #import <CoreLocation/CLLocationManager.h>
12
+ #import <CoreLocation/CLRegion.h>
13
+ #import <CoreLocation/CLVisit.h>
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ @class CLLocation;
18
+ @class CLHeading;
19
+ @class CLBeacon;
20
+ @class CLVisit;
21
+
22
+ /*
23
+ * CLLocationManagerDelegate
24
+ *
25
+ * Discussion:
26
+ * Delegate for CLLocationManager.
27
+ */
28
+ @protocol CLLocationManagerDelegate<NSObject>
29
+
30
+ @optional
31
+
32
+ /*
33
+ * locationManager:didUpdateToLocation:fromLocation:
34
+ *
35
+ * Discussion:
36
+ * Invoked when a new location is available. oldLocation may be nil if there is no previous location
37
+ * available.
38
+ *
39
+ * This method is deprecated. If locationManager:didUpdateLocations: is
40
+ * implemented, this method will not be called.
41
+ */
42
+ - (void)locationManager:(CLLocationManager *)manager
43
+ didUpdateToLocation:(CLLocation *)newLocation
44
+ fromLocation:(CLLocation *)oldLocation API_AVAILABLE(macos(10.6)) API_DEPRECATED("Implement -locationManager:didUpdateLocations: instead", ios(2.0, 6.0)) API_UNAVAILABLE(watchos, tvos, visionos);
45
+
46
+ /*
47
+ * locationManager:didUpdateLocations:
48
+ *
49
+ * Discussion:
50
+ * Invoked when new locations are available. Required for delivery of
51
+ * deferred locations. If implemented, updates will
52
+ * not be delivered to locationManager:didUpdateToLocation:fromLocation:
53
+ *
54
+ * locations is an array of CLLocation objects in chronological order.
55
+ */
56
+ - (void)locationManager:(CLLocationManager *)manager
57
+ didUpdateLocations:(NSArray<CLLocation *> *)locations API_AVAILABLE(ios(6.0), macos(10.9));
58
+
59
+ /*
60
+ * locationManager:didUpdateHeading:
61
+ *
62
+ * Discussion:
63
+ * Invoked when a new heading is available.
64
+ */
65
+ - (void)locationManager:(CLLocationManager *)manager
66
+ didUpdateHeading:(CLHeading *)newHeading API_AVAILABLE(ios(3.0), macos(10.15), watchos(2.0)) API_UNAVAILABLE(tvos, visionos);
67
+
68
+ /*
69
+ * locationManagerShouldDisplayHeadingCalibration:
70
+ *
71
+ * Discussion:
72
+ * Invoked when a new heading is available. Return YES to display heading calibration info. The display
73
+ * will remain until heading is calibrated, unless dismissed early via dismissHeadingCalibrationDisplay.
74
+ */
75
+ - (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager API_AVAILABLE(ios(3.0), macos(10.15), watchos(2.0)) API_UNAVAILABLE(tvos, visionos);
76
+
77
+ /*
78
+ * locationManager:didDetermineState:forRegion:
79
+ *
80
+ * Discussion:
81
+ * Invoked when there's a state transition for a monitored region or in response to a request for state via a
82
+ * a call to requestStateForRegion:.
83
+ */
84
+ - (void)locationManager:(CLLocationManager *)manager
85
+ didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region API_AVAILABLE(ios(7.0), macos(10.10)) API_UNAVAILABLE(watchos, tvos, visionos);
86
+
87
+ /*
88
+ * locationManager:didRangeBeacons:inRegion:
89
+ *
90
+ * Discussion:
91
+ * Invoked when a new set of beacons are available in the specified region.
92
+ * beacons is an array of CLBeacon objects.
93
+ * If beacons is empty, it may be assumed no beacons that match the specified region are nearby.
94
+ * Similarly if a specific beacon no longer appears in beacons, it may be assumed the beacon is no longer received
95
+ * by the device.
96
+ */
97
+ - (void)locationManager:(CLLocationManager *)manager
98
+ didRangeBeacons:(NSArray<CLBeacon *> *)beacons
99
+ inRegion:(CLBeaconRegion *)region API_DEPRECATED_WITH_REPLACEMENT("Use locationManager:didRangeBeacons:satisfyingConstraint:", ios(7.0, 13.0), macos(10.15, 10.15)) API_UNAVAILABLE(watchos, tvos, visionos);
100
+
101
+ /*
102
+ * locationManager:rangingBeaconsDidFailForRegion:withError:
103
+ *
104
+ * Discussion:
105
+ * Invoked when an error has occurred ranging beacons in a region. Error types are defined in "CLError.h".
106
+ */
107
+ - (void)locationManager:(CLLocationManager *)manager
108
+ rangingBeaconsDidFailForRegion:(CLBeaconRegion *)region
109
+ withError:(NSError *)error API_DEPRECATED_WITH_REPLACEMENT("Use locationManager:didFailRangingBeaconsForConstraint:error:", ios(7.0, 13.0), macos(10.15, 10.15)) API_UNAVAILABLE(watchos, tvos, visionos);
110
+
111
+ - (void)locationManager:(CLLocationManager *)manager
112
+ didRangeBeacons:(NSArray<CLBeacon *> *)beacons
113
+ satisfyingConstraint:(CLBeaconIdentityConstraint *)beaconConstraint API_AVAILABLE(ios(13.0), macos(10.15)) API_UNAVAILABLE(watchos, tvos, visionos);
114
+
115
+ - (void)locationManager:(CLLocationManager *)manager
116
+ didFailRangingBeaconsForConstraint:(CLBeaconIdentityConstraint *)beaconConstraint
117
+ error:(NSError *)error API_AVAILABLE(ios(13.0), macos(10.15)) API_UNAVAILABLE(watchos, tvos, visionos);
118
+
119
+ /*
120
+ * locationManager:didEnterRegion:
121
+ *
122
+ * Discussion:
123
+ * Invoked when the user enters a monitored region. This callback will be invoked for every allocated
124
+ * CLLocationManager instance with a non-nil delegate that implements this method.
125
+ */
126
+ - (void)locationManager:(CLLocationManager *)manager
127
+ didEnterRegion:(CLRegion *)region API_AVAILABLE(ios(4.0), macos(10.8)) API_UNAVAILABLE(watchos, tvos, visionos);
128
+
129
+ /*
130
+ * locationManager:didExitRegion:
131
+ *
132
+ * Discussion:
133
+ * Invoked when the user exits a monitored region. This callback will be invoked for every allocated
134
+ * CLLocationManager instance with a non-nil delegate that implements this method.
135
+ */
136
+ - (void)locationManager:(CLLocationManager *)manager
137
+ didExitRegion:(CLRegion *)region API_AVAILABLE(ios(4.0), macos(10.8)) API_UNAVAILABLE(watchos, tvos, visionos);
138
+
139
+ /*
140
+ * locationManager:didFailWithError:
141
+ *
142
+ * Discussion:
143
+ * Invoked when an error has occurred. Error types are defined in "CLError.h".
144
+ */
145
+ - (void)locationManager:(CLLocationManager *)manager
146
+ didFailWithError:(NSError *)error;
147
+
148
+ /*
149
+ * locationManager:monitoringDidFailForRegion:withError:
150
+ *
151
+ * Discussion:
152
+ * Invoked when a region monitoring error has occurred. Error types are defined in "CLError.h".
153
+ */
154
+ - (void)locationManager:(CLLocationManager *)manager
155
+ monitoringDidFailForRegion:(nullable CLRegion *)region
156
+ withError:(NSError *)error API_AVAILABLE(ios(4.0), macos(10.8)) API_UNAVAILABLE(watchos, tvos, visionos);
157
+
158
+ /*
159
+ * locationManager:didChangeAuthorizationStatus:
160
+ *
161
+ * Discussion:
162
+ * Invoked when the authorization status changes for this application.
163
+ */
164
+ - (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status API_DEPRECATED_WITH_REPLACEMENT("-locationManagerDidChangeAuthorization:", ios(4.2, 14.0), macos(10.7, 11.0), watchos(1.0, 7.0), tvos(9.0, 14.0)) API_UNAVAILABLE(visionos);
165
+
166
+ /*
167
+ * locationManagerDidChangeAuthorization:
168
+ *
169
+ * Discussion:
170
+ * Invoked when either the authorizationStatus or
171
+ * accuracyAuthorization properties change
172
+ */
173
+ - (void)locationManagerDidChangeAuthorization:(CLLocationManager *)manager API_AVAILABLE(ios(14.0), macos(11.0), watchos(7.0), tvos(14.0));
174
+
175
+ /*
176
+ * locationManager:didStartMonitoringForRegion:
177
+ *
178
+ * Discussion:
179
+ * Invoked when a monitoring for a region started successfully.
180
+ */
181
+ - (void)locationManager:(CLLocationManager *)manager
182
+ didStartMonitoringForRegion:(CLRegion *)region API_AVAILABLE(ios(5.0), macos(10.8)) API_UNAVAILABLE(watchos, tvos, visionos);
183
+
184
+ /*
185
+ * Discussion:
186
+ * Invoked when location updates are automatically paused.
187
+ */
188
+ - (void)locationManagerDidPauseLocationUpdates:(CLLocationManager *)manager API_AVAILABLE(ios(6.0), macos(10.15)) API_UNAVAILABLE(watchos, tvos);
189
+
190
+ /*
191
+ * Discussion:
192
+ * Invoked when location updates are automatically resumed.
193
+ *
194
+ * In the event that your application is terminated while suspended, you will
195
+ * not receive this notification.
196
+ */
197
+ - (void)locationManagerDidResumeLocationUpdates:(CLLocationManager *)manager API_AVAILABLE(ios(6.0), macos(10.15)) API_UNAVAILABLE(watchos, tvos);
198
+
199
+ /*
200
+ * locationManager:didFinishDeferredUpdatesWithError:
201
+ *
202
+ * Discussion:
203
+ * Invoked when deferred updates will no longer be delivered. Stopping
204
+ * location, disallowing deferred updates, and meeting a specified criterion
205
+ * are all possible reasons for finishing deferred updates.
206
+ *
207
+ * An error will be returned if deferred updates end before the specified
208
+ * criteria are met (see CLError), otherwise error will be nil.
209
+ */
210
+ - (void)locationManager:(CLLocationManager *)manager
211
+ didFinishDeferredUpdatesWithError:(nullable NSError *)error API_AVAILABLE(ios(6.0), macos(10.9)) API_UNAVAILABLE(watchos, tvos);
212
+
213
+ /*
214
+ * locationManager:didVisit:
215
+ *
216
+ * Discussion:
217
+ * Invoked when the CLLocationManager determines that the device has visited
218
+ * a location, if visit monitoring is currently started (possibly from a
219
+ * prior launch).
220
+ */
221
+ - (void)locationManager:(CLLocationManager *)manager didVisit:(CLVisit *)visit API_AVAILABLE(ios(8.0), macos(10.15)) API_UNAVAILABLE(watchos, tvos, visionos);
222
+
223
+ @end
224
+
225
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,33 @@
1
+ /*
2
+ * CLLocationPushServiceError.h
3
+ * CoreLocation
4
+ *
5
+ * Copyright (c) 2021 Apple Inc. All rights reserved.
6
+ *
7
+ */
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <CoreLocation/CLAvailability.h>
11
+
12
+ /*
13
+ * CLLocationPushServiceErrorDomain
14
+ *
15
+ * Discussion:
16
+ * Error returned as the domain to NSError from -[CLLocationManager startMonitoringLocationPushesWithCompletion:].
17
+ *
18
+ */
19
+ CL_EXTERN NSErrorDomain const CLLocationPushServiceErrorDomain API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(watchos, tvos, macos, macCatalyst, visionos);
20
+
21
+ /*
22
+ * CLLocationPushServiceError
23
+ *
24
+ * Discussion:
25
+ * Error returned as code to NSError from -[CLLocationManager startMonitoringLocationPushesWithCompletion:].
26
+ */
27
+ typedef NS_ERROR_ENUM(CLLocationPushServiceErrorDomain, CLLocationPushServiceError) {
28
+ CLLocationPushServiceErrorUnknown = 0,
29
+ CLLocationPushServiceErrorMissingPushExtension = 1, // App is lacking a Location Push Service Extension
30
+ CLLocationPushServiceErrorMissingPushServerEnvironment = 2, // App is lacking APNS environment
31
+ CLLocationPushServiceErrorMissingEntitlement = 3, // App is lacking the com.apple.developer.location.push entitlement
32
+ CLLocationPushServiceErrorUnsupportedPlatform = 4, // App is running on an unsupported platform
33
+ } API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(watchos, tvos, macos, macCatalyst, visionos);
@@ -0,0 +1,28 @@
1
+ /*
2
+ * CLLocationPushServiceExtension.h
3
+ * CoreLocation
4
+ *
5
+ * Copyright © 2021 Apple Inc. All rights reserved.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <CoreLocation/CoreLocation.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
13
+ API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(watchos, tvos, macos, macCatalyst) API_UNAVAILABLE(visionos)
14
+ @protocol CLLocationPushServiceExtension <NSObject>
15
+
16
+ @required
17
+
18
+ // Call the completion handler once the location push has been handled.
19
+ - (void)didReceiveLocationPushPayload:(NSDictionary <NSString *, id> *)payload completion:(void (^)(void))completion;
20
+
21
+ @optional
22
+
23
+ // Called just before this extension is terminated by the system.
24
+ - (void)serviceExtensionWillTerminate;
25
+
26
+ @end
27
+
28
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,250 @@
1
+ //
2
+ // CLLocationUpdater.h
3
+ // CoreLocation
4
+ //
5
+ // Created by Cindy Clarissa on 11/29/22.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <CoreLocation/CLAvailability.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+ @class CLLocation;
13
+ struct CLLocationCoordinate2D;
14
+
15
+ /*
16
+ * CLLiveUpdateConfiguration
17
+ *
18
+ * Discussion:
19
+ * Specifies the types of locations being generated by
20
+ * -[CLLocationUpdater liveUpdaterWithConfiguration:queue:handler:] or
21
+ * -[CLLocationUpdater liveUpdaterWithQueue:handler:]
22
+ */
23
+ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0))
24
+ typedef NS_ENUM(NSInteger, CLLiveUpdateConfiguration) {
25
+ CLLiveUpdateConfigurationDefault = 0, // Default configuration
26
+ CLLiveUpdateConfigurationAutomotiveNavigation, // Configuration tuned for automotive navigation use cases
27
+ CLLiveUpdateConfigurationOtherNavigation, // Configuration tuned for other navigation use cases
28
+ CLLiveUpdateConfigurationFitness, // Configuration tuned for fitness use cases
29
+ CLLiveUpdateConfigurationAirborne, // Configuration tuned for airborne use cases
30
+ CLLiveUpdateConfigurationMaritime API_AVAILABLE(ios(27.0), macos(27.0), watchos(27.0), tvos(27.0), visionos(27.0)), // Configuration tuned for vehicular maritime use cases
31
+ } NS_REFINED_FOR_SWIFT;
32
+
33
+ /*
34
+ * CLUpdate
35
+ *
36
+ * Discussion:
37
+ * Contains a possible location and related metadata. Delivered by
38
+ * CLLocationUpdater to its handler block.
39
+ */
40
+ CL_EXTERN
41
+ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) NS_REFINED_FOR_SWIFT
42
+ @interface CLUpdate : NSObject
43
+
44
+ /*
45
+ * authorizationDenied
46
+ *
47
+ * Discussion:
48
+ * True if updates will be suspended while the app has been denied
49
+ * location authorization.
50
+ *
51
+ */
52
+ @property (nonatomic, readonly) BOOL authorizationDenied API_AVAILABLE(ios(18.0), watchos(11.0), tvos(18.0), macos(15.0));
53
+
54
+ /*
55
+ * authorizationDeniedGlobally
56
+ *
57
+ * Discussion:
58
+ * True if updates will be suspended while the user has disabled Location
59
+ * Services system-wide.
60
+ *
61
+ */
62
+ @property (nonatomic, readonly) BOOL authorizationDeniedGlobally API_AVAILABLE(ios(18.0), watchos(11.0), tvos(18.0), macos(15.0));
63
+
64
+ /*
65
+ * authorizationRestricted
66
+ *
67
+ * Discussion:
68
+ * True if updates will be suspended while the app lacks authorization,
69
+ * and authorization changes are prevented by parental restrictions,
70
+ * MDM configuration, or other factors.
71
+ */
72
+ @property (nonatomic, readonly) BOOL authorizationRestricted API_AVAILABLE(ios(18.0), watchos(11.0), tvos(18.0), macos(15.0));
73
+
74
+ /*
75
+ * isStationary
76
+ *
77
+ * Discussion:
78
+ * Deprecated. See -stationary.
79
+ *
80
+ */
81
+ @property (readonly) BOOL isStationary API_DEPRECATED_WITH_REPLACEMENT("-stationary", ios(17.0, 17.0), macos(14.0, 14.0), tvos(17.0, 17.0));
82
+
83
+ /*
84
+ * stationary
85
+ *
86
+ * Discussion:
87
+ * Updates may stop flowing temporarily for many reasons such as
88
+ * the app is no longer authorized for locations or if its
89
+ * location becomes unknown. If CoreLocation stops
90
+ * delivering updates because the device is stationary, then
91
+ * stationary will be set to YES. Otherwise it will be NO.
92
+ *
93
+ * If stationary is YES, then updates may be suspended until
94
+ * the user next moves, or their location becomes unknown.
95
+ *
96
+ */
97
+ @property (readonly) BOOL stationary API_AVAILABLE(ios(18.0), watchos(11.0), tvos(18.0), macos(15.0));
98
+
99
+ /*
100
+ * insufficientlyInUse
101
+ *
102
+ * Discussion:
103
+ * True if updates will be suspended while the app is not sufficiently
104
+ * in-use.
105
+ *
106
+ */
107
+ @property (nonatomic, readonly) BOOL insufficientlyInUse API_AVAILABLE(ios(18.0), watchos(11.0), tvos(18.0), macos(15.0));
108
+
109
+ /*
110
+ * locationUnavailable
111
+ *
112
+ * Discussion:
113
+ * True if updates will be suspended while the device's location can no
114
+ * longer be determined.
115
+ *
116
+ */
117
+ @property (nonatomic, readonly) BOOL locationUnavailable API_AVAILABLE(ios(18.0), watchos(11.0), tvos(18.0), macos(15.0));
118
+
119
+ /*
120
+ * accuracyLimited
121
+ *
122
+ * Discussion:
123
+ * True if further updates will be suspended for some time while the app is
124
+ * subject to accuracy limitation.
125
+ *
126
+ */
127
+ @property (nonatomic, readonly) BOOL accuracyLimited API_AVAILABLE(ios(18.0), watchos(11.0), tvos(18.0), macos(15.0));
128
+
129
+ /*
130
+ * serviceSessionRequired
131
+ *
132
+ * Discussion:
133
+ * True if LocationServices are disabled because the app has adopted CLRequireExplicitServiceSession
134
+ * info.plist key but no CLServiceSession requiring authorization is outstanding yet.
135
+ *
136
+ */
137
+ @property (nonatomic, readonly) BOOL serviceSessionRequired API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos);
138
+
139
+ /*
140
+ * authorizationRequestInProgress
141
+ *
142
+ * Discussion:
143
+ * True if the system is requesting authorization from the user on behalf of the app, but no response has been received yet.
144
+ *
145
+ */
146
+ @property (nonatomic, readonly) BOOL authorizationRequestInProgress API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos);
147
+
148
+ /*
149
+ * location
150
+ *
151
+ * Discussion:
152
+ * Return the user's location if available, otherwise returns nil.
153
+ *
154
+ */
155
+ @property (nonatomic, readonly) CLLocation * _Nullable location API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0), visionos(1.0));
156
+
157
+ @end
158
+
159
+
160
+ CL_EXTERN
161
+ API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) NS_REFINED_FOR_SWIFT
162
+ @interface CLLocationUpdater : NSObject
163
+ - (instancetype)init NS_UNAVAILABLE;
164
+ + (instancetype)new NS_UNAVAILABLE;
165
+
166
+ /*
167
+ * liveUpdaterWithQueue:handler:
168
+ *
169
+ * Discussion:
170
+ * Returns a new CLLocationUpdater with the given queue and handler,
171
+ * using the default live update configuration.
172
+ *
173
+ * queue: Specifies the queue to which the handler is submitted with each
174
+ * available update.
175
+ * handler: Specifies the block that will be invoked with each update.
176
+ *
177
+ * CoreLocation will ensure the app has a few seconds of runtime to process
178
+ * each location update it is authorized to receive. If the app crashes,
179
+ * or exits for any reason while updates are flowing,
180
+ * it will be launched for the next update, which it may receive by
181
+ * calling this method again to express resumed interest.
182
+ * If this method is not called again, or the resulting updater
183
+ * is not resumed again, then CoreLocation will automatically stop the flow
184
+ * of updates.
185
+ *
186
+ */
187
+ + (nullable instancetype)liveUpdaterWithQueue:(dispatch_queue_t)queue
188
+ handler:(void(^)(CLUpdate *_Nullable update))handler API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0), visionos(1.0)) NS_REFINED_FOR_SWIFT;
189
+
190
+ /*
191
+ * liveUpdaterWithConfiguration:queue:handler:
192
+ *
193
+ * Discussion:
194
+ * Returns a new CLLocationUpdater with the given a CLLiveUpdateConfiguration,
195
+ * queue and handler.
196
+ *
197
+ * configuration: Specifies the live update configuration which should
198
+ * be used.
199
+ * queue: Specifies the queue to which the handler is submitted with each
200
+ * available update.
201
+ * handler: Specifies the block that will be invoked with each update.
202
+ *
203
+ * CoreLocation will ensure the app has a few seconds of runtime to process
204
+ * each location update it is authorized to receive. If the app crashes,
205
+ * crashes, or exits for any reason while updates are flowing,
206
+ * it will be launched for the next update, which it may receive by
207
+ * calling this method again to express resumed interest.
208
+ * If this method is not called again, or the resulting updater
209
+ * is not resumed again, then CoreLocation will automatically stop the flow
210
+ * of updates.
211
+ *
212
+ */
213
+ + (nullable instancetype)liveUpdaterWithConfiguration:(CLLiveUpdateConfiguration)configuration
214
+ queue:(dispatch_queue_t)queue
215
+ handler:(void(^)(CLUpdate * _Nullable update))handler API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0), visionos(1.0)) NS_REFINED_FOR_SWIFT;
216
+
217
+ /*
218
+ * resume
219
+ *
220
+ * Discussion:
221
+ * Start delivery of Updates to the handler, or resume from where -pause
222
+ * was called. -resume must be called to start the flow of updates when
223
+ * a CLLocationUpdater is first obtained.
224
+ */
225
+ - (void)resume API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0), tvos(17.0), visionos(1.0));
226
+
227
+ /*
228
+ * pause
229
+ *
230
+ * Discussion:
231
+ * Pause delivery of Updates to the handler, if they are started. If
232
+ * invoked from the configured queue, guarantees no further Update until
233
+ * -resume is called again. -resume can be used to restart location
234
+ * updates where they were left off.
235
+ *
236
+ */
237
+ - (void)pause API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0), visionos(1.0));
238
+
239
+ /*
240
+ * invalidate
241
+ *
242
+ * Discussion:
243
+ * Invalidate CLLocationUpdater instance. Any further message to CLLocationUpdater
244
+ * instance after invalidation results in no-op.
245
+ *
246
+ */
247
+ - (void)invalidate API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), visionos(1.0));
248
+
249
+ @end
250
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,140 @@
1
+ //
2
+ // CLMonitor.h
3
+ // CoreLocation
4
+ //
5
+ // Copyright (c) 2021 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef CLMonitor_h
9
+ #define CLMonitor_h
10
+
11
+ #import <Foundation/Foundation.h>
12
+ #import <CoreLocation/CLAvailability.h>
13
+ #import <CoreLocation/CLCondition.h>
14
+ #import <CoreLocation/CLMonitoringRecord.h>
15
+ #import <CoreLocation/CLMonitorConfiguration.h>
16
+
17
+ NS_ASSUME_NONNULL_BEGIN
18
+
19
+
20
+ /*
21
+ * `CLMonitor` is a name scoped instance which monitors all the conditions
22
+ * added to it
23
+ *
24
+ */
25
+ NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
26
+ CL_EXTERN
27
+ API_AVAILABLE(macos(14.0), ios(17.0)) API_UNAVAILABLE(watchos, tvos, visionos)
28
+ @interface CLMonitor : NSObject
29
+
30
+ /* requestMonitorWithConfiguration:completion:
31
+ * Discussion:
32
+ * Creates or opens, a `CLMonitor` instance with the given name.
33
+ * The completion handler will be called with the instance of `CLMonitor`
34
+ * on the queue that was set in the configuration instance.
35
+ *
36
+ * Conditions can be added for monitoring or removed from monitoring by
37
+ * this instance of `CLMonitor`. When an event occurs, the passed in block
38
+ * would be called on the specified queue. The callback handler is invoked
39
+ * with this instance of `CLMonitor` and an instance of `CLMonitoringEvent`
40
+ * containing the identifier under which the condition is monitored,
41
+ * an optional instance of `CLCondition` containing specifics, the new
42
+ * state, and the timestamp of the event.
43
+ *
44
+ * All interaction directly with the returned `CLMonitor` must occur on
45
+ * the specified queue. Failing to do so will result in undefined behavior.
46
+ *
47
+ * Conditions added to an instance of `CLMonitor` will persist until
48
+ * removed from monitoring. However, CoreLocation will stop monitoring
49
+ * conditions if an event is pending for them, but no `CLMonitor` has been
50
+ * configured to receive it.
51
+ *
52
+ * The conditions are stored in an opaque file at
53
+ * ~/Library/CoreLocation/BundleId (or Process name)/`name`.monitor.
54
+ * Note that for containerized Apps this will be inside the Data container.
55
+ * Apps need to observe when protected data becomes available using
56
+ * `UIApplicationProtectedDataDidBecomeAvailable` before creating a
57
+ * `CLMonitor` instance. Persistence of Conditions enables an app to query
58
+ * efficiently for conditions currently being monitored and the last
59
+ * event delivered for each.
60
+ *
61
+ * The app can choose to initialize the monitoring state for a condition.
62
+ * By default, it is set to `CLMonitoringStateUnknown`.
63
+ *
64
+ * - Note: Only one instance of `CLMonitor` with a given name may be
65
+ * opened at a time. Attempting to open another instance with the
66
+ * same name will return `false`.
67
+ *
68
+ */
69
+ + (void)requestMonitorWithConfiguration:(CLMonitorConfiguration *)config
70
+ completion:(void(^)(CLMonitor *monitor))completionHandler
71
+ NS_REFINED_FOR_SWIFT NS_SWIFT_ASYNC(2);
72
+
73
+ /*
74
+ * name
75
+ *
76
+ * Discussion:
77
+ * Name associated with the `CLMonitor` instance.
78
+ *
79
+ */
80
+ @property (nonatomic, readonly) NSString *name;
81
+
82
+ /*
83
+ * monitoredIdentifiers
84
+ *
85
+ * Discussion:
86
+ * Array containing all the identifiers with each identifying a condition
87
+ * that is monitored.
88
+ *
89
+ */
90
+ @property (nonatomic, readonly) NSArray<NSString *> *monitoredIdentifiers;
91
+
92
+ /*
93
+ * addConditionForMonitoring:identifier:
94
+ *
95
+ * Discussion:
96
+ * Adds `condition` to be monitored under `identifier`.
97
+ * It initializes the monitoring state to `CLMonitoringStateUnknown`.
98
+ *
99
+ */
100
+ - (void)addConditionForMonitoring:(CLCondition *)condition
101
+ identifier:(NSString *)identifier;
102
+
103
+ /*
104
+ * addConditionForMonitoring:identifier:assumedState
105
+ *
106
+ * Discussion:
107
+ * Adds `condition` to be monitored under `identifier`.
108
+ * It initializes the monitoring state with the given value.
109
+ *
110
+ */
111
+ - (void)addConditionForMonitoring:(CLCondition *)condition
112
+ identifier:(NSString *)identifier
113
+ assumedState:(CLMonitoringState)state;
114
+
115
+ /*
116
+ * removeConditionFromMonitoringWithIdentifier:
117
+ *
118
+ * Discussion:
119
+ * Removes the monitoring record with given `identifier` from monitoring
120
+ *
121
+ */
122
+ - (void)removeConditionFromMonitoringWithIdentifier:(NSString *)identifier;
123
+
124
+ /*
125
+ * monitoringRecordForIdentifier:
126
+ *
127
+ * Discussion:
128
+ * Gets the monitoring record containing the condition and last
129
+ * monitoring event, if applicable
130
+ *
131
+ */
132
+ - (nullable CLMonitoringRecord *)monitoringRecordForIdentifier:(NSString *)identifier;
133
+
134
+ - (instancetype)init NS_UNAVAILABLE;
135
+ + (instancetype)new NS_UNAVAILABLE;
136
+
137
+ @end
138
+
139
+ NS_ASSUME_NONNULL_END
140
+ #endif /* CLMonitor_h */