peachsim 0.1.1744 → 0.1.1801

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 (690) hide show
  1. package/README.md +28 -28
  2. package/cli/account-gate.ts +97 -0
  3. package/cli/app-catalog.ts +24 -0
  4. package/cli/app-stubs.ts +7 -0
  5. package/cli/auth.ts +48 -18
  6. package/cli/bin.ts +35 -2
  7. package/cli/bridge-flow-runner.ts +174 -6
  8. package/cli/cloud-dispatch.ts +0 -3
  9. package/cli/command-registry.ts +2 -6
  10. package/cli/commands/auth.ts +68 -3
  11. package/cli/commands/compat.ts +1116 -0
  12. package/cli/commands/control.ts +90 -13
  13. package/cli/commands/coverage.ts +85 -116
  14. package/cli/commands/detox.ts +20 -20
  15. package/cli/commands/device.ts +31 -27
  16. package/cli/commands/doctor.ts +76 -1032
  17. package/cli/commands/flow.ts +80 -41
  18. package/cli/commands/guest-host.ts +2 -2
  19. package/cli/commands/inspect/core.ts +8 -7
  20. package/cli/commands/inspect/settling.ts +60 -25
  21. package/cli/commands/inspect/wait-ready.ts +6 -4
  22. package/cli/commands/inspect/wait-selector.ts +32 -18
  23. package/cli/commands/inspect.ts +8 -6
  24. package/cli/commands/kotlin.ts +15 -6
  25. package/cli/commands/logout.ts +4 -2
  26. package/cli/commands/maestro-compare.ts +19 -37
  27. package/cli/commands/maestro-generate.ts +4 -4
  28. package/cli/commands/maestro.ts +56 -37
  29. package/cli/commands/package.ts +136 -57
  30. package/cli/commands/preview.ts +10 -1
  31. package/cli/commands/{film.ts → record-three.ts} +33 -28
  32. package/cli/commands/record.ts +41 -39
  33. package/cli/commands/screenshots.ts +4 -0
  34. package/cli/commands/setup.ts +38 -1
  35. package/cli/commands/shell-url.ts +49 -24
  36. package/cli/commands/swift.ts +29 -11
  37. package/cli/commands/test.ts +43 -13
  38. package/cli/commands/upload.ts +12 -9
  39. package/cli/drivers/playwright-core-pin.ts +2 -2
  40. package/cli/flow-export.ts +1 -1
  41. package/cli/flow-file.ts +1 -1
  42. package/cli/internal-child.ts +3 -8
  43. package/cli/maestro-compare.ts +73 -7
  44. package/cli/maestro-js.ts +1 -1
  45. package/cli/maestro-report.ts +1 -1
  46. package/cli/maestro-workspace.ts +66 -4
  47. package/cli/main.ts +22 -55
  48. package/cli/native-input.ts +13 -20
  49. package/cli/outbound-endpoints.ts +40 -7
  50. package/cli/output-redaction.ts +8 -3
  51. package/cli/packaged-app-launcher.ts +40 -28
  52. package/cli/prompt.ts +20 -0
  53. package/cli/recording-access.ts +7 -7
  54. package/cli/run-registry.ts +1 -1
  55. package/cli/scene-video.ts +0 -4
  56. package/cli/ws-bridge.ts +7 -4
  57. package/detox/index.ts +293 -50
  58. package/detox/jest-preset.cjs +6 -0
  59. package/detox/launch-permissions.ts +1 -21
  60. package/dist-lib/agent-daemon-client.cjs +1 -1
  61. package/dist-lib/agent-events.cjs +1 -1
  62. package/dist-lib/attached-projects.cjs +1 -1
  63. package/dist-lib/auth/shared-session.cjs +1 -1
  64. package/dist-lib/backend-origin.cjs +1 -1
  65. package/dist-lib/beta.cjs +1 -1
  66. package/dist-lib/beta.mjs +1 -1
  67. package/dist-lib/bridge-constants.cjs +1 -1
  68. package/dist-lib/bridge-contract-input.cjs +1 -1
  69. package/dist-lib/bridge-contract-input.mjs +1 -1
  70. package/dist-lib/bridge-contract.cjs +2 -8
  71. package/dist-lib/bridge-contract.mjs +2 -7
  72. package/dist-lib/bundle-channel.cjs +45273 -38265
  73. package/dist-lib/capture-contract.cjs +37 -14
  74. package/dist-lib/capture-contract.mjs +36 -13
  75. package/dist-lib/cloud-contract.cjs +1 -1
  76. package/dist-lib/cloud-contract.mjs +1 -1
  77. package/dist-lib/cloud-test-args.cjs +1 -1
  78. package/dist-lib/cloud-test-args.mjs +1 -1
  79. package/dist-lib/cloud.cjs +2 -2
  80. package/dist-lib/cloud.mjs +2 -2
  81. package/dist-lib/config.cjs +1 -1
  82. package/dist-lib/config.mjs +1 -1
  83. package/dist-lib/detox/index.cjs +562 -126
  84. package/dist-lib/detox/jest-preset.cjs +6 -0
  85. package/dist-lib/dev-bundle-resolution.cjs +18 -13
  86. package/dist-lib/expo-swift-bundle.cjs +28566 -23874
  87. package/dist-lib/expo-swift-metadata.cjs +104 -2
  88. package/dist-lib/expo-swift-metadata.mjs +104 -2
  89. package/dist-lib/home-paths.cjs +8 -5
  90. package/dist-lib/host/bridge-host.cjs +36618 -29846
  91. package/dist-lib/host/fetch-proxy-handler.cjs +23 -20
  92. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  93. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  94. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  95. package/dist-lib/host/websocket-proxy.cjs +5 -2
  96. package/dist-lib/index.cjs +1921 -1549
  97. package/dist-lib/jump-to-source-babel.cjs +1 -1
  98. package/dist-lib/jump-to-source-native.cjs +1 -1
  99. package/dist-lib/kotlin-host.cjs +1 -1
  100. package/dist-lib/menu.cjs +21 -7
  101. package/dist-lib/menu.mjs +21 -7
  102. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  103. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  104. package/dist-lib/metro-production-bundle.cjs +1 -1
  105. package/dist-lib/metro-production-bundle.mjs +1 -1
  106. package/dist-lib/metro.cjs +1877 -1584
  107. package/dist-lib/native-app-identity-project.cjs +1274 -951
  108. package/dist-lib/native-app-identity-project.mjs +1414 -963
  109. package/dist-lib/native-app-identity.cjs +64 -58
  110. package/dist-lib/native-app-identity.mjs +64 -58
  111. package/dist-lib/native-firebase-metadata.cjs +1 -1
  112. package/dist-lib/native-firebase-metadata.mjs +1 -1
  113. package/dist-lib/plist.cjs +1 -1
  114. package/dist-lib/plist.mjs +1 -1
  115. package/dist-lib/profiles.cjs +1 -1
  116. package/dist-lib/public-brand.cjs +1 -1
  117. package/dist-lib/public-origins-lib-esm.json +79 -33
  118. package/dist-lib/public-origins-lib-static.json +1 -1
  119. package/dist-lib/public-origins-lib.json +484 -280
  120. package/dist-lib/react-native-host-modules.cjs +3 -1
  121. package/dist-lib/react-native-host-modules.mjs +3 -1
  122. package/dist-lib/reap-browser.cjs +23 -26
  123. package/dist-lib/scripts/dev-server-scanner.cjs +13 -10
  124. package/dist-lib/sdk.cjs +69 -36
  125. package/dist-lib/sdk.mjs +69 -36
  126. package/dist-lib/skills.cjs +33781 -27141
  127. package/dist-lib/swift-compile.cjs +3759 -2520
  128. package/dist-lib/swift-compile.mjs +3680 -2441
  129. package/dist-lib/swift-package.cjs +33 -1
  130. package/dist-lib/swift-package.mjs +31 -1
  131. package/dist-lib/swift-submit.cjs +1 -1
  132. package/dist-lib/swift-submit.mjs +1 -1
  133. package/dist-lib/swift-toolchain.cjs +102 -5
  134. package/dist-lib/swift.cjs +1 -1
  135. package/dist-lib/vite-swift.cjs +16480 -14579
  136. package/dist-lib/vite.cjs +269 -295
  137. package/dist-lib/worklet-executable.cjs +1 -1
  138. package/dist-lib/worklet-executable.mjs +1 -1
  139. package/dist-types/packages/peach-compat/src/secure-item-store.d.ts +38 -0
  140. package/dist-types/packages/peach-compat/src/stubs/ring-mode-state.d.ts +4 -0
  141. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +21 -12
  142. package/dist-types/packages/peach-engine/src/billing/plans.d.ts +1 -2
  143. package/dist-types/packages/peach-engine/src/capture/browser-composite-provider.d.ts +2 -0
  144. package/dist-types/packages/peach-engine/src/capture/browser-composite.d.ts +1 -1
  145. package/dist-types/packages/peach-engine/src/engine/animated-driven-style.d.ts +10 -10
  146. package/dist-types/packages/peach-engine/src/engine/animated.d.ts +1 -0
  147. package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +6 -2
  148. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -0
  149. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +3 -2
  150. package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +5 -0
  151. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +3 -0
  152. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
  153. package/dist-types/packages/peach-engine/src/engine/lottie-runtime.d.ts +3 -0
  154. package/dist-types/packages/peach-engine/src/engine/native-animation-driver.d.ts +18 -1
  155. package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
  156. package/dist-types/packages/peach-engine/src/engine/nativeReplayContract.d.ts +71 -0
  157. package/dist-types/packages/peach-engine/src/engine/node.d.ts +31 -3
  158. package/dist-types/packages/peach-engine/src/engine/paint-boundary-types.d.ts +0 -1
  159. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +7 -2
  160. package/dist-types/packages/peach-engine/src/engine/portals.d.ts +2 -4
  161. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +5 -0
  162. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +7 -1
  163. package/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +3 -3
  164. package/dist-types/packages/peach-engine/src/engine/scroll-velocity.d.ts +1 -0
  165. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +10 -0
  166. package/dist-types/packages/peach-engine/src/engine/secureItemHostContract.d.ts +30 -0
  167. package/dist-types/packages/peach-engine/src/engine/shell-owned-values.d.ts +55 -0
  168. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +2 -1
  169. package/dist-types/packages/peach-engine/src/engine/types.d.ts +85 -26
  170. package/dist-types/packages/peach-engine/src/graphite-stats-fields.d.ts +28 -0
  171. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +1 -0
  172. package/dist-types/packages/peach-engine/src/ios/aux-home-scene.d.ts +3 -4
  173. package/dist-types/packages/peach-engine/src/ios/aux-shell-animated-sources.d.ts +1 -1
  174. package/dist-types/packages/peach-engine/src/ios/home-app-catalog.d.ts +2 -0
  175. package/dist-types/packages/peach-engine/src/ios/photo-store.d.ts +2 -0
  176. package/dist-types/packages/peach-engine/src/ios/photoLibraryContract.d.ts +15 -0
  177. package/dist-types/packages/peach-engine/src/ios/shell-controller-types.d.ts +1 -0
  178. package/dist-types/packages/peach-engine/src/metro-asset-path.d.ts +2 -0
  179. package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +1 -0
  180. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  181. package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +2 -0
  182. package/dist-types/packages/peach-engine/src/render-worker/canvaskit-worker-init.d.ts +1 -1
  183. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +31 -12
  184. package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-presentation.d.ts +23 -0
  185. package/dist-types/packages/peach-engine/src/render-worker/expo-widgetContract.d.ts +6 -0
  186. package/dist-types/packages/peach-engine/src/render-worker/expo-widgets-activityContract.d.ts +15 -0
  187. package/dist-types/packages/peach-engine/src/render-worker/graph-linked-value.d.ts +3 -1
  188. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +12 -2
  189. package/dist-types/packages/peach-engine/src/render-worker/image-pixel-contract.d.ts +12 -0
  190. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +30 -0
  191. package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +4 -1
  192. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -9
  193. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror-tenant.d.ts +3 -1
  194. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +24 -0
  195. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +8 -4
  196. package/dist-types/packages/peach-engine/src/render-worker/shell-scene-schema.d.ts +4 -0
  197. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +3 -2
  198. package/dist-types/packages/peach-engine/src/render-worker/text-inputContract.d.ts +1 -0
  199. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
  200. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -0
  201. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +10 -1
  202. package/dist-types/packages/peach-engine/src/render-worker/worklet-sab.d.ts +5 -0
  203. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +2 -1
  204. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +4 -0
  205. package/dist-types/packages/peach-globals/src/eventBridgeContract.d.ts +1 -1
  206. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +7 -0
  207. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -1
  208. package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +5 -1
  209. package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +2 -0
  210. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +3 -1
  211. package/dist-types/packages/peach-kit/src/capabilities.d.ts +23 -1
  212. package/dist-types/packages/peach-kit/src/internal.d.ts +2 -1
  213. package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +2 -0
  214. package/dist-types/packages/peach-kit/src/ui/keyboard-toolbar.d.ts +5 -0
  215. package/install.sh +20 -1
  216. package/package.json +6 -5
  217. package/runtime-companion.json +1 -1
  218. package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h +629 -0
  219. package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionDeprecated.h +90 -0
  220. package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionRoute.h +256 -0
  221. package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h +1006 -0
  222. package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVFAudio.apinotes +246 -0
  223. package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Headers/AVFAudio.h +5 -0
  224. package/sdk/ios/System/Library/Frameworks/AVFAudio.framework/Modules/module.modulemap +5 -0
  225. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAnimation.h +52 -0
  226. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioSession.h +11 -0
  227. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h +264 -0
  228. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h +88 -0
  229. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSession.h +1360 -0
  230. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureSessionPreset.h +167 -0
  231. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h +13 -0
  232. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMediaFormat.h +508 -0
  233. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMetadataItem.h +1 -1
  234. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h +31 -0
  235. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVSampleBufferDisplayLayer.h +18 -0
  236. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureDeviceDirectionCoordinator.h +113 -0
  237. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEvent.h +82 -0
  238. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEventInteraction.h +114 -0
  239. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVCaptureEventSound.h +50 -0
  240. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVError.h +51 -0
  241. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVInputPickerInteraction.h +93 -0
  242. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVInterstitialTimeRange.h +39 -0
  243. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKit.apinotes +112 -0
  244. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKit.h +110 -0
  245. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKitDefines.h +79 -0
  246. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVKitTypes.h +54 -0
  247. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVLegibleMediaOptionsMenuController.h +193 -0
  248. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController.h +271 -0
  249. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController_AVSampleBufferDisplayLayerSupport.h +135 -0
  250. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPictureInPictureController_VideoCallSupport.h +66 -0
  251. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackRouteSelecting.h +46 -0
  252. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeed.h +71 -0
  253. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackUserInterfaceControllable.h +551 -0
  254. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerItem+AVKitAdditions.h +42 -0
  255. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerViewController.h +704 -0
  256. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Headers/AVRoutePickerView.h +186 -0
  257. package/sdk/ios/System/Library/Frameworks/AVKit.framework/Modules/module.modulemap +5 -0
  258. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +1 -1
  259. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +1 -1
  260. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +1 -1
  261. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +1 -1
  262. package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/AudioSessionTypes.h +104 -0
  263. package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioBaseTypes.h +1621 -0
  264. package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.apinotes +42 -0
  265. package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.h +9 -0
  266. package/sdk/ios/System/Library/Frameworks/CoreAudioTypes.framework/Modules/module.modulemap +6 -0
  267. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAttribute.h +1 -1
  268. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManager.h +1 -1
  269. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCharacteristic.h +1 -1
  270. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDescriptor.h +1 -1
  271. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h +1 -1
  272. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeer.h +1 -1
  273. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheral.h +1 -1
  274. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBService.h +1 -1
  275. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h +1 -1
  276. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h +1 -1
  277. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h +1 -1
  278. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h +1 -1
  279. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h +1 -1
  280. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreRequest.h +1 -1
  281. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFRunLoop.h +195 -0
  282. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSocket.h +220 -0
  283. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h +501 -0
  284. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +3 -18
  285. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +1 -1
  286. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +2 -2
  287. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +1 -1
  288. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +2 -2
  289. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +1 -1
  290. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +1 -1
  291. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +1 -1
  292. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +2 -2
  293. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +1 -1
  294. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +1 -1
  295. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMBase.h +443 -0
  296. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h +8 -0
  297. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMSync.h +996 -0
  298. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMTime.h +9 -0
  299. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h +3 -0
  300. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFMessage.h +1 -1
  301. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFPayload.h +2 -2
  302. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFReaderSession.h +1 -1
  303. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCReaderSession.h +1 -1
  304. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularData.h +1 -1
  305. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h +1 -1
  306. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h +1811 -0
  307. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontCollection.h +360 -0
  308. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h +574 -17
  309. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontManagerErrors.h +109 -0
  310. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFrame.h +336 -0
  311. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h +203 -0
  312. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTGlyphInfo.h +264 -0
  313. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h +531 -0
  314. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTParagraphStyle.h +496 -0
  315. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRubyAnnotation.h +326 -0
  316. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRun.h +547 -0
  317. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTRunDelegate.h +213 -0
  318. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTStringAttributes.h +496 -0
  319. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTTextTab.h +158 -0
  320. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h +286 -0
  321. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h +80 -1
  322. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h +1833 -0
  323. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/SFNTTypes.h +482 -0
  324. package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DDDevicePickerViewController.h +41 -0
  325. package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DeviceDiscoveryUI.h +9 -0
  326. package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Headers/DeviceDiscoveryUIDefines.h +14 -0
  327. package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Modules/DeviceDiscoveryUI.swiftcrossimport/SwiftUI.swiftoverlay +4 -0
  328. package/sdk/ios/System/Library/Frameworks/DeviceDiscoveryUI.framework/Modules/module.modulemap +9 -0
  329. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +1 -1
  330. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +49 -1
  331. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h +2 -0
  332. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSRegularExpression.h +15 -0
  333. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSUbiquitousKeyValueStore.h +30 -0
  334. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievement.h +3 -3
  335. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKBasePlayer.h +1 -1
  336. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallenge.h +6 -6
  337. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h +4 -4
  338. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLocalPlayer.h +6 -6
  339. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmaker.h +2 -2
  340. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKNotificationBanner.h +1 -1
  341. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPlayer.h +3 -3
  342. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGame.h +2 -2
  343. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatch.h +4 -4
  344. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatchmakerViewController.h +3 -3
  345. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h +1 -1
  346. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h +1 -1
  347. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h +1 -1
  348. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalType.h +1 -1
  349. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h +6 -6
  350. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h +1 -1
  351. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h +5 -5
  352. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h +1 -1
  353. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h +1 -1
  354. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h +1 -1
  355. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h +14 -14
  356. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h +1 -1
  357. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h +1 -1
  358. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h +1 -1
  359. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h +1 -1
  360. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h +20 -20
  361. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +1 -1
  362. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h +2 -0
  363. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageDestination.h +2 -0
  364. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageMetadata.h +2 -0
  365. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h +2 -0
  366. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h +2 -0
  367. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/ImageIOBase.h +6 -0
  368. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSBase.h +195 -0
  369. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSContext.h +245 -0
  370. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSContextRef.h +178 -0
  371. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSExport.h +151 -0
  372. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSManagedValue.h +81 -0
  373. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSObjectRef.h +755 -0
  374. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSStringRef.h +148 -0
  375. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSStringRefCF.h +60 -0
  376. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSTypedArray.h +180 -0
  377. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSValue.h +824 -0
  378. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSValueRef.h +555 -0
  379. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSVirtualMachine.h +92 -0
  380. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JavaScript.h +37 -0
  381. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/JavaScriptCore.h +38 -0
  382. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Headers/WebKitAvailability.h +36 -0
  383. package/sdk/ios/System/Library/Frameworks/JavaScriptCore.framework/Modules/module.modulemap +8 -0
  384. package/sdk/ios/System/Library/Frameworks/MobileCoreServices.framework/Headers/UTType.h +19 -0
  385. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCAdvertiserAssistant.h +76 -0
  386. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCBrowserViewController.h +88 -0
  387. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCError.h +34 -0
  388. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCNearbyServiceAdvertiser.h +84 -0
  389. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCNearbyServiceBrowser.h +94 -0
  390. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCPeerID.h +37 -0
  391. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MCSession.h +215 -0
  392. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MultipeerConnectivity.apinotes +5 -0
  393. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Headers/MultipeerConnectivity.h +15 -0
  394. package/sdk/ios/System/Library/Frameworks/MultipeerConnectivity.framework/Modules/module.modulemap +7 -0
  395. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotHelper.h +1 -1
  396. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h +1 -1
  397. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +1 -1
  398. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +1 -1
  399. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +1 -1
  400. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +1 -1
  401. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +1 -1
  402. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +1 -1
  403. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +1 -1
  404. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +1 -1
  405. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +1 -1
  406. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +1 -1
  407. package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h +1 -1
  408. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h +6 -6
  409. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h +1 -1
  410. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h +1 -1
  411. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h +1 -1
  412. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +2 -2
  413. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +1 -1
  414. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h +2 -2
  415. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h +1 -1
  416. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h +1 -1
  417. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h +1 -1
  418. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h +4 -4
  419. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +1 -1
  420. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +2 -2
  421. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h +1 -1
  422. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h +1 -1
  423. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h +1 -1
  424. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitDeprecated.h +3 -3
  425. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSLayoutManager.h +14 -0
  426. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +172 -27
  427. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSText.h +59 -0
  428. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextContainer.h +13 -0
  429. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextList.h +63 -0
  430. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSTextStorage.h +10 -0
  431. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSToolbar+UIKitAdditions.h +142 -0
  432. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +20 -20
  433. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAction.h +103 -0
  434. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +6 -0
  435. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UICommand.h +131 -0
  436. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +8 -3
  437. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFont.h +80 -0
  438. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFontDescriptor.h +191 -0
  439. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGeometry.h +259 -0
  440. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +9 -3
  441. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +5 -3
  442. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +6 -3
  443. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInteraction.h +37 -0
  444. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +4248 -0
  445. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +66 -102
  446. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h +55 -0
  447. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UILayoutGuide.h +62 -0
  448. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenu.h +283 -0
  449. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuDisplayPreferences.h +27 -0
  450. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuElement.h +86 -0
  451. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenuLeaf.h +68 -0
  452. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +1 -0
  453. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +2 -2
  454. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +3 -0
  455. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +2 -0
  456. package/sdk/ios/System/Library/Frameworks/UIKitText.framework/Headers/UIKitText.apinotes +135 -0
  457. package/sdk/ios/System/Library/Frameworks/UIKitText.framework/Modules/module.modulemap +8 -0
  458. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTAdditions.h +167 -0
  459. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTCoreTypes.h +1332 -0
  460. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.apinotes +53 -0
  461. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.h +18 -0
  462. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Modules/module.modulemap +6 -0
  463. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h +19 -0
  464. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNError.h +29 -0
  465. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotification.h +27 -0
  466. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAction.h +69 -0
  467. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationActionIcon.h +23 -0
  468. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAttachment.h +44 -0
  469. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationAttributedMessageContext.h +24 -0
  470. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationCategory.h +82 -0
  471. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h +152 -0
  472. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationRequest.h +34 -0
  473. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationResponse.h +41 -0
  474. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationServiceExtension.h +27 -0
  475. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSettings.h +90 -0
  476. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSound.h +45 -0
  477. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationTrigger.h +64 -0
  478. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h +107 -0
  479. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes +17 -0
  480. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.h +23 -0
  481. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Modules/module.modulemap +6 -0
  482. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCDefines.h +14 -0
  483. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCError.h +38 -0
  484. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSession.h +200 -0
  485. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSessionFile.h +30 -0
  486. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WCSessionUserInfoTransfer.h +22 -0
  487. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WatchConnectivity.apinotes +19 -0
  488. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Headers/WatchConnectivity.h +15 -0
  489. package/sdk/ios/System/Library/Frameworks/WatchConnectivity.framework/Modules/module.modulemap +5 -0
  490. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/NSAttributedString.h +120 -0
  491. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardList.h +77 -0
  492. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardListItem.h +54 -0
  493. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleList.h +37 -0
  494. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleListStore.h +47 -0
  495. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorld.h +87 -0
  496. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorldConfiguration.h +71 -0
  497. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContextMenuElementInfo.h +47 -0
  498. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDOMNodeSnapshot.h +57 -0
  499. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDataDetectorTypes.h +60 -0
  500. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h +67 -0
  501. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h +146 -0
  502. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKError.h +71 -0
  503. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindConfiguration.h +52 -0
  504. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindResult.h +41 -0
  505. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFormInfo.h +63 -0
  506. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFoundation.h +72 -0
  507. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFrameInfo.h +62 -0
  508. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKHTTPCookieStore.h +108 -0
  509. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKImmersiveEnvironment.h +50 -0
  510. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKImmersiveEnvironmentDelegate.h +69 -0
  511. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKJSHandle.h +80 -0
  512. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigation.h +45 -0
  513. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h +118 -0
  514. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationDelegate.h +219 -0
  515. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationResponse.h +60 -0
  516. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h +47 -0
  517. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPDFConfiguration.h +49 -0
  518. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h +117 -0
  519. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewActionItem.h +39 -0
  520. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewActionItemIdentifiers.h +38 -0
  521. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewElementInfo.h +43 -0
  522. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKProcessPool.h +39 -0
  523. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessage.h +64 -0
  524. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessageHandler.h +52 -0
  525. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessageHandlerWithReply.h +95 -0
  526. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSecurityOrigin.h +57 -0
  527. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSnapshotConfiguration.h +59 -0
  528. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUIDelegate.h +316 -0
  529. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKURLSchemeHandler.h +61 -0
  530. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKURLSchemeTask.h +75 -0
  531. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserContentController.h +162 -0
  532. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h +76 -0
  533. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h +237 -0
  534. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionAction.h +164 -0
  535. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionCommand.h +106 -0
  536. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h +790 -0
  537. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h +255 -0
  538. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h +89 -0
  539. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerDelegate.h +207 -0
  540. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataRecord.h +90 -0
  541. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionDataType.h +43 -0
  542. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h +175 -0
  543. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMessagePort.h +99 -0
  544. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionPermission.h +95 -0
  545. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTab.h +396 -0
  546. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionTabConfiguration.h +94 -0
  547. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindow.h +170 -0
  548. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionWindowConfiguration.h +87 -0
  549. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h +800 -0
  550. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h +275 -0
  551. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h +150 -0
  552. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataRecord.h +90 -0
  553. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h +137 -0
  554. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWindowFeatures.h +72 -0
  555. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes +204 -0
  556. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h +93 -0
  557. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WebKitLegacy.h +3 -0
  558. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Modules/module.modulemap +5 -0
  559. package/sdk/ios/System/Library/Frameworks/WiFiAware.framework/Modules/WiFiAware.swiftmodule/arm64-apple-ios-simulator.swiftinterface +605 -0
  560. package/sdk/ios/System/Library/Frameworks/_DeviceDiscoveryUI_SwiftUI.framework/Modules/_DeviceDiscoveryUI_SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +79 -0
  561. package/sdk/ios/usr/include/MacTypes.h +8 -0
  562. package/sdk/ios/usr/include/objc/NSObjCRuntime.h +5 -0
  563. package/sdk/ios/wasm/include/fcntl.h +1 -0
  564. package/sdk/ios/wasm/include/pthread.h +2 -0
  565. package/sdk/ios/wasm/include/stdlib.h +1 -0
  566. package/sdk/native-hashes.json +11 -1
  567. package/skills/contrast/SKILL.md +4 -9
  568. package/skills/peach-perf/SKILL.md +3 -1
  569. package/skills/peach-perf/references/profiling.md +1 -1
  570. package/skills/peach-test/SKILL.md +20 -17
  571. package/skills/peach-test/references/detox.md +7 -7
  572. package/skills/peach-test/references/maestro.md +20 -18
  573. package/src/admitted-mac-build.ts +7 -0
  574. package/src/android-autolinking.ts +2 -2
  575. package/src/android-drawables.ts +5 -5
  576. package/src/android-string-value.ts +1 -1
  577. package/src/android-strings.ts +1 -1
  578. package/src/android-theme.ts +2 -2
  579. package/src/appPackageContract.ts +1 -1
  580. package/src/bridge-contract.ts +12 -16
  581. package/src/build-cache.ts +65 -0
  582. package/src/bundle-channel.mjs +69 -9
  583. package/src/capture-contract.ts +55 -17
  584. package/src/chromium-admission.ts +24 -21
  585. package/src/conformance-comparison-contract.ts +105 -40
  586. package/src/dev-bundle-resolution.ts +23 -10
  587. package/src/device-catalog.ts +35 -2
  588. package/src/disk-cleanup.ts +18 -8
  589. package/src/expo-autolinking.ts +24 -0
  590. package/src/expo-discovery-cache.ts +168 -23
  591. package/src/expo-native-workspace.ts +551 -191
  592. package/src/expo-swift-host.ts +711 -314
  593. package/src/expo-swift-ready.ts +39 -5
  594. package/src/expo-widget-assets.ts +2 -2
  595. package/src/expo-widgets-bundle.ts +56 -0
  596. package/src/expo-workspace-exclusion.ts +62 -0
  597. package/src/expoSwiftContract.ts +27 -4
  598. package/src/forked-script-contract.ts +3 -0
  599. package/src/home-paths.ts +10 -6
  600. package/src/host/bridge-host.ts +27 -0
  601. package/src/host/network-policy.ts +1 -1
  602. package/src/kotlin-app.ts +9 -11
  603. package/src/kotlin-host.ts +2 -2
  604. package/src/launchMetadataContract.ts +5 -0
  605. package/src/menu.ts +19 -5
  606. package/src/native-app-identity-project.ts +35 -49
  607. package/src/native-app-identity.ts +5 -6
  608. package/src/native-firebase-config.ts +10 -48
  609. package/src/native-prebuilt.ts +3 -2
  610. package/src/native-slices.ts +39 -0
  611. package/src/native-static-libraries.ts +73 -0
  612. package/src/nitro-adapter.lock.json +249 -249
  613. package/src/nitro-adapter.ts +16 -5
  614. package/src/nitro-bundle.ts +35 -16
  615. package/src/nitro-compile.ts +254 -16
  616. package/src/nitro-compiler-digest.ts +39 -0
  617. package/src/nitro-dependencies.ts +368 -28
  618. package/src/nitro-source.ts +432 -77
  619. package/src/nitro-superset.lock.json +27 -36
  620. package/src/nitro-superset.ts +6 -0
  621. package/src/nitroAdapterContract.ts +52 -0
  622. package/src/nitroContract.ts +40 -4
  623. package/src/numbered-lock.ts +2 -2
  624. package/src/one-native-app-accent.ts +32 -0
  625. package/src/one-widget-discovery.ts +6 -1
  626. package/src/one-widget-metadata.ts +2 -2
  627. package/src/portable-expo-contract.ts +103 -0
  628. package/src/portable-expo-workspace.ts +94 -0
  629. package/src/prepared-native-inventory.ts +93 -0
  630. package/src/prepared-xcode-phases.ts +194 -0
  631. package/src/process-group.ts +8 -15
  632. package/src/process-table.ts +117 -0
  633. package/src/react-native-bridge-modules.ts +240 -14
  634. package/src/react-native-coverage/native-typescript-parser.ts +11 -2
  635. package/src/react-native-coverage/verified-reach.ts +12 -6
  636. package/src/react-native-host-modules.ts +2 -0
  637. package/src/reap-browser.ts +13 -9
  638. package/src/retired-cache-directory.ts +34 -0
  639. package/src/runtime-assets.ts +1 -0
  640. package/src/screenshots/orchestrate.ts +4 -0
  641. package/src/screenshots/schema.ts +2 -2
  642. package/src/storageSnapshotContract.ts +9 -2
  643. package/src/stub-pattern-matcher.ts +53 -19
  644. package/src/swift-compile.ts +1011 -327
  645. package/src/swift-compiler-digest.ts +3 -0
  646. package/src/swift-coverage/indexing.ts +1 -1
  647. package/src/swift-coverage/xcode-asset-symbols.ts +72 -39
  648. package/src/swift-coverage/xcode-assets.ts +2 -1
  649. package/src/swift-cxx-declarations.ts +114 -130
  650. package/src/swift-cxx-standin.ts +3 -3
  651. package/src/swift-darwin-records.ts +88 -0
  652. package/src/swift-distribution.lock.json +15 -12
  653. package/src/swift-distribution.ts +25 -9
  654. package/src/swift-host.ts +443 -142
  655. package/src/swift-icu.ts +72 -4
  656. package/src/swift-link-roots.ts +2 -0
  657. package/src/swift-objc-compile.ts +312 -65
  658. package/src/swift-objc-import.ts +8 -1
  659. package/src/swift-objc-standin.ts +20 -2
  660. package/src/swift-package-manifest.ts +189 -57
  661. package/src/swift-package.ts +51 -0
  662. package/src/swift-packages.ts +117 -45
  663. package/src/swift-pdf-raster.ts +7 -4
  664. package/src/swift-project-user.ts +183 -0
  665. package/src/swift-reproducible.ts +26 -0
  666. package/src/swift-root-lock.ts +34 -62
  667. package/src/swift-shared-sdk.ts +232 -21
  668. package/src/swift-source-pods.ts +9 -2
  669. package/src/swift-standin-emit.ts +248 -7
  670. package/src/swift-standins.ts +130 -108
  671. package/src/swift-submit.ts +3 -0
  672. package/src/swift-toolchain.ts +109 -8
  673. package/src/swift-wasm-prune.ts +210 -55
  674. package/src/swiftContract.ts +14 -0
  675. package/src/swiftGuestImageContract.ts +113 -0
  676. package/src/turbo-bundle.ts +5 -8
  677. package/src/turbo-codegen-intake.ts +134 -0
  678. package/src/turbo-compile.ts +198 -21
  679. package/src/turbo-native-libraries.ts +98 -0
  680. package/src/turbo-runtime.lock.json +25 -18
  681. package/src/turbo-source.ts +1519 -147
  682. package/src/vite-plugin-one.ts +25 -3
  683. package/src/vite-plugin-swift.ts +5 -1
  684. package/src/vite-plugin.ts +40 -18
  685. package/src/worker-system-chunks.ts +103 -15
  686. package/src/worklets-babel.ts +50 -29
  687. package/src/xcode-header-search.ts +15 -5
  688. package/src/xcode-project.ts +444 -88
  689. package/src/xcode-target-members.ts +72 -63
  690. package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/scroll-drag-resample.d.ts +0 -44
@@ -13,14 +13,19 @@ import fs from 'node:fs'
13
13
  import path from 'node:path'
14
14
  import plist from 'plist'
15
15
  import { isRecord } from './is-record'
16
+ import { preparedXcodePhase } from './prepared-xcode-phases'
16
17
  import { assetSymbolSettingKeys } from './swift-coverage/xcode-assets'
17
18
  import { isSwiftNativeTranslationUnit, moduleMapName } from './swift-package'
18
19
  import {
19
- resolveSwiftPackageRequirements,
20
+ resolveSwiftPackageRequirementsAsync,
20
21
  type SwiftRemoteRequirement,
21
22
  } from './swift-package-manifest'
22
23
  import { readXcodeJsonProject } from './xcode-json-project'
23
- import { visitXcodeTargetMembers, xcodePathResolver } from './xcode-target-members'
24
+ import {
25
+ xcodeBuildFileBuildsForIos,
26
+ xcodeTargetMemberVisitor,
27
+ xcodePathResolver,
28
+ } from './xcode-target-members'
24
29
  import type { SwiftLinkedProduct } from './swift-packages'
25
30
  import type { SwiftNativeHeaderMap } from './swiftContract'
26
31
 
@@ -47,6 +52,9 @@ import {
47
52
  // project without IPHONEOS_DEPLOYMENT_TARGET, printed 27.0 beside SDK_VERSION 27.1).
48
53
  const XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = '27.0'
49
54
 
55
+ // a run script that never exits (a swiftpm artifact download, a stalled tool) must fail the stage with its error, not hang it
56
+ const runScriptTimeoutMs = 10 * 60 * 1000
57
+
50
58
  // clang.xcspec's CLANG_CXX_LANGUAGE_STANDARD values: c++0x keeps its old
51
59
  // spelling, and these standards leave c++ modules off unless modules are on.
52
60
  const CXX_STANDARD_ALIASES: Record<string, string> = {
@@ -67,6 +75,8 @@ const PRE_CXX20_STANDARDS = new Set([
67
75
 
68
76
  export interface XcodeModuleTarget {
69
77
  name: string
78
+ /** the installed development pod's evaluated PODS_TARGET_SRCROOT. */
79
+ podRoot?: string
70
80
  /** the module name the target's sources compile as. */
71
81
  moduleName: string
72
82
  /** absolute paths of the swift sources that are members of the target. */
@@ -91,6 +101,8 @@ export interface XcodeModuleTarget {
91
101
  swift?: {
92
102
  flags: string[]
93
103
  includePaths: string[]
104
+ cxxInterop: boolean
105
+ cxxStandard: string | null
94
106
  compatibility: {
95
107
  /** true when xcode derives the products from the framework layout, without a phase. */
96
108
  framework: boolean
@@ -132,6 +144,8 @@ export interface XcodeModuleTarget {
132
144
 
133
145
  /** an application target, resolved to files on disk with everything it builds. */
134
146
  export interface XcodeAppTarget extends XcodeModuleTarget {
147
+ /** original Clang maps behind CocoaPods' generated compatibility products. */
148
+ moduleMapSources?: Record<string, string>
135
149
  /**
136
150
  * the deepest directory holding the workspace, every project and every
137
151
  * local package the app builds from: every compile path is relative to it.
@@ -153,8 +167,11 @@ export interface XcodeAppTarget extends XcodeModuleTarget {
153
167
  * products directory, so every one is importable from every other.
154
168
  */
155
169
  frameworks: XcodeModuleTarget[]
156
- /** built resource products copied by the selected targets, at bundle-relative destinations. */
157
- resourceProducts: { path: string; resources: string[]; infoPlist: string }[]
170
+ /** generated or prebuilt resource products copied at bundle-relative destinations. */
171
+ resourceProducts: ({ path: string; resources: string[] } & (
172
+ | { infoPlist: string }
173
+ | { sourceRoot: string }
174
+ ))[]
158
175
  /** package products the app and its frameworks link, with the package each names. */
159
176
  linkedProducts: SwiftLinkedProduct[]
160
177
  /** local package directories the workspace or a project references. */
@@ -359,6 +376,8 @@ export function enclosingXcodeWorkspace(xcodeproj: string): string | null {
359
376
  /**
360
377
  * the workspace or project a path names: the bundle itself, or in a
361
378
  * directory its one workspace, else its one project, as xcode opens it.
379
+ * beside one app project, several workspaces resolve to the installed one
380
+ * (see selectXcodeWorkspace); anything else ambiguous still throws.
362
381
  */
363
382
  export function findXcodeProject(input: string): string | null {
364
383
  const resolved = path.resolve(input)
@@ -376,6 +395,10 @@ export function findXcodeProject(input: string): string | null {
376
395
  .filter((name) => name.endsWith(extension))
377
396
  .sort()
378
397
  if (found.length > 1) {
398
+ if (extension === '.xcworkspace') {
399
+ const selected = selectXcodeWorkspace(resolved, found)
400
+ if (selected) return selected
401
+ }
379
402
  throw new Error(
380
403
  `${resolved} holds ${found.length} ${extension} bundles (${found.join(', ')}); pass one`,
381
404
  )
@@ -385,6 +408,59 @@ export function findXcodeProject(input: string): string | null {
385
408
  return null
386
409
  }
387
410
 
411
+ // same bundle by spelling, or by canonical path when both sides exist.
412
+ function sameXcodeProject(reference: string, xcodeproj: string): boolean {
413
+ if (path.normalize(reference) === path.normalize(xcodeproj)) return true
414
+ try {
415
+ return (
416
+ fs.existsSync(reference) &&
417
+ fs.existsSync(xcodeproj) &&
418
+ fs.realpathSync(reference) === fs.realpathSync(xcodeproj)
419
+ )
420
+ } catch {
421
+ return false
422
+ }
423
+ }
424
+
425
+ /**
426
+ * the installed workspace in a directory holding several: beside one app
427
+ * project, the one workspace listing it, or the project's own
428
+ * `<name>.xcworkspace` when several list it, as `pod install` writes it. a
429
+ * duplicate listing the same project and a renamed leftover listing a
430
+ * missing one both lose to it. anything else stays ambiguous and returns
431
+ * null: several projects need a selected target, and workspaces no project
432
+ * owns name nothing to open.
433
+ */
434
+ export function selectXcodeWorkspace(
435
+ directory: string,
436
+ workspaces: readonly string[],
437
+ ): string | null {
438
+ const sorted = [...workspaces].sort()
439
+ if (sorted.length === 0) return null
440
+ if (sorted.length === 1) return path.join(directory, sorted[0]!)
441
+ const xcodeprojs = fs
442
+ .readdirSync(directory)
443
+ .filter((name) => name.endsWith('.xcodeproj'))
444
+ .sort()
445
+ if (xcodeprojs.length !== 1) return null
446
+ const app = path.join(directory, xcodeprojs[0]!)
447
+ const referencing = sorted.filter((workspace) => {
448
+ try {
449
+ return workspaceReferences(path.join(directory, workspace)).some((reference) =>
450
+ sameXcodeProject(reference, app),
451
+ )
452
+ } catch {
453
+ // an unreadable workspace cannot prove it lists the app project
454
+ return false
455
+ }
456
+ })
457
+ if (referencing.length === 1) return path.join(directory, referencing[0]!)
458
+ if (referencing.length === 0) return null
459
+ const own = `${path.basename(app, '.xcodeproj')}.xcworkspace`
460
+ const named = referencing.filter((workspace) => workspace === own)
461
+ return named.length === 1 ? path.join(directory, named[0]!) : null
462
+ }
463
+
388
464
  function versionRequirement(
389
465
  url: string,
390
466
  requirement: PlistDict,
@@ -439,6 +515,7 @@ interface LoadedProject {
439
515
  projectDir: string
440
516
  object: (id: string | undefined) => PlistDict | undefined
441
517
  resolvePath: (id: string) => string | null
518
+ visitMembers: ReturnType<typeof xcodeTargetMemberVisitor>
442
519
  }
443
520
 
444
521
  const loaded = new Map<string, { digest: string; project: LoadedProject }>()
@@ -488,6 +565,7 @@ function loadProject(xcodeproj: string): LoadedProject {
488
565
  projectDir,
489
566
  object,
490
567
  resolvePath,
568
+ visitMembers: xcodeTargetMemberVisitor(objects),
491
569
  }
492
570
  loaded.set(projectFile, { digest, project: result })
493
571
  return result
@@ -593,8 +671,20 @@ function targetSettings(
593
671
  resolving.delete(marker)
594
672
  return value
595
673
  }
674
+ let developerDir: string | undefined
596
675
  // export derived settings too, just as explicit project settings are exported.
597
676
  const derivedSettings: Record<string, () => string> = {
677
+ DEVELOPER_DIR: () =>
678
+ options.environment?.DEVELOPER_DIR ??
679
+ process.env.DEVELOPER_DIR ??
680
+ (developerDir ??=
681
+ process.platform === 'darwin'
682
+ ? // runner-toolchain-platform: darwin
683
+ execFileSync('xcode-select', ['-p'], {
684
+ encoding: 'utf8',
685
+ stdio: ['ignore', 'pipe', 'pipe'],
686
+ }).trim()
687
+ : ''),
598
688
  PRODUCT_NAME: () => get('TARGET_NAME'),
599
689
  PRODUCT_MODULE_NAME: () => applyOperator(get('PRODUCT_NAME'), 'c99extidentifier'),
600
690
  EXECUTABLE_NAME: () => get('PRODUCT_NAME'),
@@ -731,6 +821,49 @@ function expand(value: string, lookup: (name: string) => string): string {
731
821
 
732
822
  const preparedSourcePhases = new Map<string, string>()
733
823
 
824
+ // catalog compilers in script phases need not also list their input in a
825
+ // resources phase. read literal actool inputs without executing the script.
826
+ function shellAssetCatalogs(
827
+ script: string,
828
+ settings: (key: string) => string,
829
+ projectDir: string,
830
+ ): string[] {
831
+ const assigned = new Map<string, string>()
832
+ const catalogs: string[] = []
833
+ const resolve = (raw: string) => {
834
+ if (raw.startsWith("'")) return raw.slice(1, -1)
835
+ const lookup = (key: string) => assigned.get(key) ?? settings(key)
836
+ // shell `${NAME:-default}` is not a build setting operator
837
+ const shell = (raw.startsWith('"') ? raw.slice(1, -1) : raw).replace(
838
+ /\$\{([A-Za-z_][A-Za-z0-9_]*):-([^{}`]*)\}/g,
839
+ (_match, key: string, fallback: string) => lookup(key) || fallback,
840
+ )
841
+ if (/\$\{[A-Za-z_][A-Za-z0-9_]*(?::?[-+=?]|[#%/^,])/.test(shell)) return null
842
+ const value = expand(shell, lookup)
843
+ return /[$`]/.test(value) ? null : value
844
+ }
845
+ for (const raw of script.split(/\r?\n/)) {
846
+ const line = raw.trim()
847
+ const assignment =
848
+ /^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=("[^"`]*"|'[^']*'|[^\s;`]+)$/.exec(line)
849
+ if (assignment) {
850
+ const value = resolve(assignment[2]!)
851
+ if (value !== null) assigned.set(assignment[1]!, value)
852
+ else assigned.delete(assignment[1]!)
853
+ continue
854
+ }
855
+ const compile = /^(?:xcrun\s+)?actool\s+(.*)$/.exec(line)
856
+ if (!compile) continue
857
+ const tokens = compile[1]!.match(/"[^"`]*"|'[^']*'|[^\s;`]+/g) ?? []
858
+ for (const token of tokens) {
859
+ if (token.startsWith('-')) break
860
+ const file = resolve(token)
861
+ if (file?.endsWith('.xcassets')) catalogs.push(path.resolve(projectDir, file))
862
+ }
863
+ }
864
+ return catalogs
865
+ }
866
+
734
867
  // the `cp <from> <to>` lines of a shell phase, read without running it. only a
735
868
  // script of whole lines that are comments, `set` options, `echo`, simple assignments
736
869
  // or two-operand copies is understood, with every variable resolved from those
@@ -844,6 +977,12 @@ function targetMembers(
844
977
  const phase = project.object(phaseId)
845
978
  if (phase?.isa !== 'PBXShellScriptBuildPhase') continue
846
979
  const script = str(phase.name) ?? phaseId
980
+ for (const catalog of shellAssetCatalogs(
981
+ str(phase.shellScript) ?? '',
982
+ settings,
983
+ project.projectDir,
984
+ ))
985
+ for (const file of walkFiles(catalog)) resources.add(file)
847
986
  copiedFiles.push(
848
987
  ...shellCopies(str(phase.shellScript) ?? '', settings, project.projectDir),
849
988
  )
@@ -880,6 +1019,18 @@ function targetMembers(
880
1019
  if (allOutputs.some((file) => file.endsWith('.swift') || file === infoPlistOutput))
881
1020
  for (const file of inputFiles) if (fs.existsSync(file)) projectInputs.add(file)
882
1021
  if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
1022
+ const configuration = settings('CONFIGURATION')
1023
+ if (
1024
+ preparedXcodePhase(
1025
+ project.projectFile,
1026
+ targetId,
1027
+ phaseId,
1028
+ configuration,
1029
+ allOutputs,
1030
+ false,
1031
+ )
1032
+ )
1033
+ continue
883
1034
  const phaseDir = path.join(settings('TARGET_TEMP_DIR'), `Script-${phaseId}`)
884
1035
  for (const lists of fileLists.values())
885
1036
  for (const { file } of lists)
@@ -925,8 +1076,17 @@ function targetMembers(
925
1076
  if (
926
1077
  preparedSourcePhases.get(key) === stamp &&
927
1078
  allOutputs.every((file) => fs.existsSync(file))
928
- )
1079
+ ) {
1080
+ preparedXcodePhase(
1081
+ project.projectFile,
1082
+ targetId,
1083
+ phaseId,
1084
+ configuration,
1085
+ allOutputs,
1086
+ true,
1087
+ )
929
1088
  continue
1089
+ }
930
1090
  fs.mkdirSync(phaseDir, { recursive: true })
931
1091
  fs.mkdirSync(settings('BUILT_PRODUCTS_DIR'), { recursive: true })
932
1092
  fs.mkdirSync(settings('DERIVED_FILE_DIR'), { recursive: true })
@@ -949,6 +1109,7 @@ function targetMembers(
949
1109
  env,
950
1110
  stdio: ['ignore', 'pipe', 'pipe'],
951
1111
  maxBuffer: Infinity,
1112
+ timeout: runScriptTimeoutMs,
952
1113
  },
953
1114
  )
954
1115
  } catch (error) {
@@ -974,10 +1135,17 @@ function targetMembers(
974
1135
  `${targetName}: Run Script "${script}" did not produce ${missing.join(', ')}`,
975
1136
  )
976
1137
  preparedSourcePhases.set(key, stamp)
1138
+ preparedXcodePhase(
1139
+ project.projectFile,
1140
+ targetId,
1141
+ phaseId,
1142
+ configuration,
1143
+ allOutputs,
1144
+ true,
1145
+ )
977
1146
  }
978
1147
  }
979
- visitXcodeTargetMembers(
980
- project.objects,
1148
+ project.visitMembers(
981
1149
  targetId,
982
1150
  project.resolvePath,
983
1151
  (file) => (isDirectory(file) ? walkFiles(file) : fs.existsSync(file) ? [file] : []),
@@ -1004,21 +1172,6 @@ function targetMembers(
1004
1172
  if (file.endsWith('.swift')) sources.add(file)
1005
1173
  },
1006
1174
  )
1007
- for (const [file] of scriptForOutput) {
1008
- if (sources.has(file) || allSources.has(file)) continue
1009
- // a declared output no member names stays missing when the script no
1010
- // longer writes it; xcode tolerates that, and the member read above
1011
- // already refused a consumed source that is missing.
1012
- if (!fs.existsSync(file)) continue
1013
- // xcode names a file by its filesystem identity, so a declaration
1014
- // whose case differs from the file on disk still means that file.
1015
- // canonicalize before adding, else the same file compiles twice.
1016
- const canonical = fs.realpathSync(file)
1017
- if (sources.has(canonical) || allSources.has(canonical)) continue
1018
- allSources.add(canonical)
1019
- sources.add(canonical)
1020
- }
1021
-
1022
1175
  return {
1023
1176
  sources: [...sources].sort(),
1024
1177
  resources: [...resources].sort(),
@@ -1192,6 +1345,17 @@ export function listXcodeAppTargets(
1192
1345
  .map((ref) => str(ref.target.name) ?? ref.id)
1193
1346
  }
1194
1347
 
1348
+ // Expo's default run scheme is the first application in the native target
1349
+ // section, whose order can differ from the PBXProject targets array.
1350
+ function defaultXcodeAppTarget(xcodeproj: string): string | undefined {
1351
+ const project = loadProject(fs.realpathSync(xcodeproj))
1352
+ for (const [id, target] of Object.entries(project.objects)) {
1353
+ if (!isDict(target) || target.isa !== 'PBXNativeTarget') continue
1354
+ if (isIosAppTarget({ project, id, target }, { requireSources: false }))
1355
+ return str(target.name)
1356
+ }
1357
+ }
1358
+
1195
1359
  // extension catalogs belong to the extension's resource phase, independently
1196
1360
  // of the containing app. use the same membership and settings as app builds.
1197
1361
  export function readXcodeExtensionTargets(input: string): {
@@ -1318,6 +1482,119 @@ export function readXcodeScheme(
1318
1482
  return { target: name, configuration }
1319
1483
  }
1320
1484
 
1485
+ // identity, native resources and preparation share the builder's app choice.
1486
+ export class NativeAppTargetSelectionError extends Error {}
1487
+
1488
+ export function selectIosAppTarget(
1489
+ projectRoot: string,
1490
+ iosTarget?: string,
1491
+ ): { xcodeproj: string; target: string } | null {
1492
+ // react native's own repo keeps its xcode project beside package.json
1493
+ const nested = path.join(projectRoot, 'ios')
1494
+ const iosRoot = fs.existsSync(nested) ? nested : projectRoot
1495
+ const projects = fs
1496
+ .readdirSync(iosRoot, { withFileTypes: true })
1497
+ .filter((entry) => entry.isDirectory() && entry.name.endsWith('.xcodeproj'))
1498
+ if (projects.length === 0) return null
1499
+ if (projects.length > 1 && !iosTarget) {
1500
+ throw new NativeAppTargetSelectionError(
1501
+ `native app identity requires a selected Xcode project; set withPeach's iosTarget to an app target in one of: ${projects.map((entry) => entry.name).join(', ')}`,
1502
+ )
1503
+ }
1504
+ let project = projects[0]!
1505
+ if (iosTarget && projects.length > 1) {
1506
+ const matches = projects.filter((entry) =>
1507
+ listXcodeAppTargets(path.join(iosRoot, entry.name), {
1508
+ requireSources: false,
1509
+ }).includes(iosTarget),
1510
+ )
1511
+ if (matches.length === 0)
1512
+ throw new Error(`native app identity has no application target ${iosTarget}`)
1513
+ if (matches.length > 1)
1514
+ throw new Error(
1515
+ `native app identity target ${iosTarget} is ambiguous across ${matches.map((entry) => entry.name).join(', ')}`,
1516
+ )
1517
+ project = matches[0]!
1518
+ }
1519
+ const xcodeproj = path.join(iosRoot, project.name)
1520
+ const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false })
1521
+ let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj)
1522
+ if (!target) throw new Error('native app identity has no iOS application target')
1523
+ if (!iosTarget) {
1524
+ const workspace = xcodeproj.replace(/\.xcodeproj$/, '.xcworkspace')
1525
+ const container = fs.existsSync(workspace) ? workspace : xcodeproj
1526
+ const hasScheme = [container, xcodeproj].some((dir) => {
1527
+ if (
1528
+ fs.existsSync(path.join(dir, 'xcshareddata', 'xcschemes', `${target}.xcscheme`))
1529
+ )
1530
+ return true
1531
+ const users = path.join(dir, 'xcuserdata')
1532
+ return (
1533
+ fs.existsSync(users) &&
1534
+ fs
1535
+ .readdirSync(users)
1536
+ .some((user) =>
1537
+ fs.existsSync(path.join(users, user, 'xcschemes', `${target}.xcscheme`)),
1538
+ )
1539
+ )
1540
+ })
1541
+ if (hasScheme) target = readXcodeScheme(container, target).target
1542
+ }
1543
+ if (!appTargets.includes(target))
1544
+ throw new Error(`native app identity has no application target ${target}`)
1545
+ return { xcodeproj, target }
1546
+ }
1547
+
1548
+ // xcode keeps the pins in the workspace it opened: the named one, or the project's own
1549
+ const workspaceResolvedFile = (xcodeprojOrWorkspace: string) =>
1550
+ path.join(
1551
+ xcodeprojOrWorkspace.endsWith('.xcworkspace')
1552
+ ? xcodeprojOrWorkspace
1553
+ : path.join(xcodeprojOrWorkspace, 'project.xcworkspace'),
1554
+ 'xcshareddata',
1555
+ 'swiftpm',
1556
+ 'Package.resolved',
1557
+ )
1558
+
1559
+ export class SwiftPackageResolutionRequired extends Error {
1560
+ constructor(
1561
+ readonly requirements: SwiftRemoteRequirement[],
1562
+ readonly destination: string,
1563
+ ) {
1564
+ super(
1565
+ `the project has no Package.resolved: ${destination}; await prepareXcodeSwiftPackages first`,
1566
+ )
1567
+ }
1568
+ }
1569
+
1570
+ /**
1571
+ * writes the workspace's Package.resolved when it has none, so the
1572
+ * synchronous reads that follow find the lock. a read that compiles throws
1573
+ * without it.
1574
+ */
1575
+ export async function resolveXcodeSwiftPackages(
1576
+ input: string,
1577
+ signal?: AbortSignal,
1578
+ target?: string,
1579
+ configuration?: string,
1580
+ ): Promise<void> {
1581
+ if (fs.existsSync(workspaceResolvedFile(fs.realpathSync(input)))) return
1582
+ try {
1583
+ readXcodeAppTarget(input, target, configuration, {
1584
+ installedPods: true,
1585
+ requireSources: false,
1586
+ deferPackageResolution: true,
1587
+ })
1588
+ } catch (error) {
1589
+ if (!(error instanceof SwiftPackageResolutionRequired)) throw error
1590
+ await resolveSwiftPackageRequirementsAsync(
1591
+ error.requirements,
1592
+ error.destination,
1593
+ signal,
1594
+ )
1595
+ }
1596
+ }
1597
+
1321
1598
  /**
1322
1599
  * the application target `targetName` names (or the workspace's only one),
1323
1600
  * with every framework, library and package it builds: its member files
@@ -1334,6 +1611,13 @@ export function readXcodeAppTarget(
1334
1611
  environment?: Record<string, string>
1335
1612
  /** build the CocoaPods project `pod install` generated, as Xcode does. */
1336
1613
  installedPods?: boolean
1614
+ /** snapshot only these native modules, without the application's resources. */
1615
+ nativeModules?: readonly string[]
1616
+ /**
1617
+ * throw when the project has remote packages and no lock. a read that
1618
+ * compiles sets it; one that only reads metadata leaves the graph empty.
1619
+ */
1620
+ deferPackageResolution?: boolean
1337
1621
  } = {},
1338
1622
  ): XcodeAppTarget {
1339
1623
  // canonical, so every path returned agrees with the host's realpath checks
@@ -1399,17 +1683,20 @@ export function readXcodeAppTarget(
1399
1683
  const found: TargetRef[] = []
1400
1684
  for (const dependencyId of list(target.dependencies)) {
1401
1685
  const dependency = project.object(dependencyId)
1402
- const direct = str(dependency?.target)
1686
+ if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue
1687
+ const direct = str(dependency.target)
1403
1688
  const resolved = direct
1404
1689
  ? projectTargets(project).find((candidate) => candidate.id === direct)
1405
- : proxied(project, str(dependency?.targetProxy))
1690
+ : proxied(project, str(dependency.targetProxy))
1406
1691
  if (resolved) found.push(resolved)
1407
1692
  }
1408
1693
  for (const phaseId of list(target.buildPhases)) {
1409
1694
  const phase = project.object(phaseId)
1410
1695
  if (phase?.isa !== 'PBXFrameworksBuildPhase') continue
1411
1696
  for (const buildFileId of list(phase.files)) {
1412
- const file = project.object(str(project.object(buildFileId)?.fileRef))
1697
+ const buildFile = project.object(buildFileId)
1698
+ if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue
1699
+ const file = project.object(str(buildFile.fileRef))
1413
1700
  const resolved =
1414
1701
  file?.isa === 'PBXReferenceProxy'
1415
1702
  ? proxied(project, str(file.remoteRef))
@@ -1445,8 +1732,9 @@ export function readXcodeAppTarget(
1445
1732
  if (phase?.isa !== 'PBXHeadersBuildPhase') return []
1446
1733
  return list(phase.files).flatMap((id) => {
1447
1734
  const file = ref.project.object(id)
1448
- const resolved = ref.project.resolvePath(str(file?.fileRef) ?? '')
1449
- const attributes = isDict(file?.settings) ? list(file.settings.ATTRIBUTES) : []
1735
+ if (!file || !xcodeBuildFileBuildsForIos(file)) return []
1736
+ const resolved = ref.project.resolvePath(str(file.fileRef) ?? '')
1737
+ const attributes = isDict(file.settings) ? list(file.settings.ATTRIBUTES) : []
1450
1738
  if (!resolved) return []
1451
1739
  return [
1452
1740
  {
@@ -1460,13 +1748,20 @@ export function readXcodeAppTarget(
1460
1748
  ]
1461
1749
  })
1462
1750
  })
1463
- const productName = (ref: TargetRef) =>
1464
- targetSettings(
1751
+ const productNames = new Map<string, string>()
1752
+ const productName = (ref: TargetRef) => {
1753
+ const key = `${ref.project.xcodeproj}\0${ref.id}`
1754
+ const cached = productNames.get(key)
1755
+ if (cached !== undefined) return cached
1756
+ const product = targetSettings(
1465
1757
  ref,
1466
1758
  configuration,
1467
1759
  { TARGET_NAME: str(ref.target.name) ?? ref.id },
1468
1760
  options,
1469
1761
  ).get('PRODUCT_NAME')
1762
+ productNames.set(key, product)
1763
+ return product
1764
+ }
1470
1765
  // a synchronized folder is not a file reference and has no headers-phase
1471
1766
  // row. xcode still publishes each header it contributes as a project header.
1472
1767
  const syncHeaderCache = new Map<string, string[]>()
@@ -1475,8 +1770,7 @@ export function readXcodeAppTarget(
1475
1770
  const cached = syncHeaderCache.get(key)
1476
1771
  if (cached) return cached
1477
1772
  const found: string[] = []
1478
- visitXcodeTargetMembers(
1479
- ref.project.objects,
1773
+ ref.project.visitMembers(
1480
1774
  ref.id,
1481
1775
  ref.project.resolvePath,
1482
1776
  (file) => (isDirectory(file) ? walkFiles(file) : fs.existsSync(file) ? [file] : []),
@@ -1690,7 +1984,8 @@ export function readXcodeAppTarget(
1690
1984
  // any c-family unit, the versioning unit included, takes the objective-c
1691
1985
  // implementation route.
1692
1986
  const implementations = allSources.filter(isSwiftNativeTranslationUnit)
1693
- const native = implementations.length > 0
1987
+ const native =
1988
+ implementations.length > 0 || Boolean(settings('SWIFT_OBJC_BRIDGING_HEADER'))
1694
1989
  // the header search xcode generates that peach does not model refuses
1695
1990
  // here, before any unit compiles without it.
1696
1991
  if (native && building) {
@@ -1820,6 +2115,9 @@ export function readXcodeAppTarget(
1820
2115
  module: {
1821
2116
  name,
1822
2117
  moduleName,
2118
+ ...(settings('PODS_TARGET_SRCROOT')
2119
+ ? { podRoot: absolute(settings('PODS_TARGET_SRCROOT')) }
2120
+ : {}),
1823
2121
  ...members,
1824
2122
  allSources,
1825
2123
  languageMode: swiftVersion >= 6 ? 6 : 5,
@@ -1838,8 +2136,16 @@ export function readXcodeAppTarget(
1838
2136
  ...(members.sources.length > 0
1839
2137
  ? {
1840
2138
  swift: {
1841
- flags: settingList(settings('OTHER_SWIFT_FLAGS')),
2139
+ flags: [
2140
+ ...settingList(settings('SWIFT_OPTIMIZATION_LEVEL')),
2141
+ ...settingList(settings('OTHER_SWIFT_FLAGS')),
2142
+ ],
1842
2143
  includePaths: settingList(settings('SWIFT_INCLUDE_PATHS')).map(absolute),
2144
+ cxxInterop: settings('SWIFT_OBJC_INTEROP_MODE') === 'objcxx',
2145
+ cxxStandard:
2146
+ cxxStandard && cxxStandard !== 'compiler-default'
2147
+ ? (CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard)
2148
+ : null,
1843
2149
  compatibility: swiftCompatibility,
1844
2150
  },
1845
2151
  }
@@ -1853,17 +2159,7 @@ export function readXcodeAppTarget(
1853
2159
  ),
1854
2160
  ...podHeaders.filter((file) => HEADER_FILE.test(file)),
1855
2161
  ],
1856
- headers: [
1857
- ...new Set([
1858
- ...headers,
1859
- ...Object.keys(ref.project.objects).flatMap((id) => {
1860
- const file = ref.project.resolvePath(id)
1861
- return file && HEADER_FILE.test(file) && fs.existsSync(file)
1862
- ? [file]
1863
- : []
1864
- }),
1865
- ]),
1866
- ],
2162
+ headers,
1867
2163
  prefixHeader: settings('GCC_PREFIX_HEADER')
1868
2164
  ? absolute(settings('GCC_PREFIX_HEADER'))
1869
2165
  : null,
@@ -1990,7 +2286,10 @@ export function readXcodeAppTarget(
1990
2286
  ? [[path.join(wrapper, 'Modules', 'module.modulemap'), moduleMap]]
1991
2287
  : []),
1992
2288
  ])
1993
- : Object.fromEntries(podHeaders.map((file) => [file, file])),
2289
+ : Object.fromEntries([
2290
+ ...podHeaders.map((file) => [file, file]),
2291
+ ...(moduleMap ? [[moduleMap, moduleMap]] : []),
2292
+ ]),
1994
2293
  },
1995
2294
  }
1996
2295
  : {}),
@@ -2001,19 +2300,33 @@ export function readXcodeAppTarget(
2001
2300
  // aggregate targets run phases but do not contribute a compiled module.
2002
2301
  const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }))
2003
2302
  const { settings, keys: settingKeys, module } = builtTargets.at(-1)!
2004
- const frameworkTargets = builtTargets
2005
- .slice(0, -1)
2303
+ const nativeTargets = new Set<TargetRef>()
2304
+ const includeNativeTarget = (ref: TargetRef) => {
2305
+ if (nativeTargets.has(ref)) return
2306
+ nativeTargets.add(ref)
2307
+ for (const dependency of dependenciesOf(ref)) includeNativeTarget(dependency)
2308
+ }
2309
+ for (const { ref, module } of builtTargets)
2310
+ if (options.nativeModules?.includes(module.moduleName)) includeNativeTarget(ref)
2311
+ const selectedTargets = options.nativeModules
2312
+ ? builtTargets.filter((target) => nativeTargets.has(target.ref))
2313
+ : builtTargets
2314
+ const frameworkTargets = selectedTargets
2315
+ .filter((target) => target !== builtTargets.at(-1))
2006
2316
  .filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? ''))
2007
2317
  .map(({ ref, module }) => ({ ref, framework: module }))
2008
2318
  const frameworks = frameworkTargets.map(({ framework }) => framework)
2009
- // a development pod's sources sit outside the sandbox, where its podspec is
2010
- const podSourceDirs = frameworkTargets.flatMap(({ ref, framework }) =>
2011
- isPodsProject(ref.project.xcodeproj)
2012
- ? [...framework.allSources, ...(framework.objc?.headers ?? [])]
2013
- .map((file) => path.dirname(file))
2014
- .filter((dir) => fs.existsSync(dir))
2015
- : [],
2016
- )
2319
+ // a development pod's sources sit outside the sandbox, where its podspec is.
2320
+ // the sandbox's public headers link into every installed pod, selected or not.
2321
+ const podSourceDirs = builtTargets
2322
+ .slice(0, -1)
2323
+ .flatMap(({ ref, module }) =>
2324
+ isPodsProject(ref.project.xcodeproj)
2325
+ ? [...module.allSources, ...(module.objc?.headers ?? [])]
2326
+ .map((file) => path.dirname(file))
2327
+ .filter((dir) => fs.existsSync(dir))
2328
+ : [],
2329
+ )
2017
2330
 
2018
2331
  const expandValue = (
2019
2332
  value: plist.PlistValue,
@@ -2036,7 +2349,7 @@ export function readXcodeAppTarget(
2036
2349
  const bundleTargets = builtTargets.filter(
2037
2350
  ({ ref }) => ref.target.productType === RESOURCE_BUNDLE,
2038
2351
  )
2039
- for (const owner of options.installedPods ? builtTargets : []) {
2352
+ for (const owner of options.installedPods ? selectedTargets : []) {
2040
2353
  for (const phaseId of list(owner.ref.target.buildPhases)) {
2041
2354
  const phase = owner.ref.project.object(phaseId)
2042
2355
  if (
@@ -2052,12 +2365,14 @@ export function readXcodeAppTarget(
2052
2365
  xcconfigs.add(file)
2053
2366
  return fileListEntries(file, absolute)
2054
2367
  })
2055
- const inputs = entries(list(phase.inputFileListPaths)).filter((file) =>
2056
- file.endsWith('.bundle'),
2057
- )
2058
- const outputs = entries(list(phase.outputFileListPaths)).filter((file) =>
2059
- file.endsWith('.bundle'),
2060
- )
2368
+ const inputs = [
2369
+ ...list(phase.inputPaths).map(absolute),
2370
+ ...entries(list(phase.inputFileListPaths)),
2371
+ ].filter((file) => file.endsWith('.bundle'))
2372
+ const outputs = [
2373
+ ...list(phase.outputPaths).map(absolute),
2374
+ ...entries(list(phase.outputFileListPaths)),
2375
+ ].filter((file) => file.endsWith('.bundle'))
2061
2376
  if (inputs.length !== outputs.length)
2062
2377
  throw new Error(`${owner.module.name}: resource bundle copy lists differ`)
2063
2378
  const destinationRoot = path.join(
@@ -2071,7 +2386,7 @@ export function readXcodeAppTarget(
2071
2386
  )
2072
2387
  return file && path.join(target.settings('TARGET_BUILD_DIR'), file) === input
2073
2388
  })
2074
- if (!product)
2389
+ if (!product && !isDirectory(input))
2075
2390
  throw new Error(
2076
2391
  `${owner.module.name}: resource bundle input has no selected producer: ${input}`,
2077
2392
  )
@@ -2085,13 +2400,13 @@ export function readXcodeAppTarget(
2085
2400
  throw new Error(
2086
2401
  `${owner.module.name}: invalid resource bundle copy destination`,
2087
2402
  )
2088
- const infoFile = path.resolve(
2089
- product.ref.project.projectDir,
2090
- product.settings('INFOPLIST_FILE'),
2091
- )
2092
- xcconfigs.add(infoFile)
2093
- const parsed = plist.parse(fs.readFileSync(infoFile, 'utf8'))
2094
- const infoPlist = plist.build(expandValue(parsed, product.settings))
2403
+ const infoFile = product
2404
+ ? path.resolve(
2405
+ product.ref.project.projectDir,
2406
+ product.settings('INFOPLIST_FILE'),
2407
+ )
2408
+ : null
2409
+ if (infoFile) xcconfigs.add(infoFile)
2095
2410
  const prefix =
2096
2411
  owner.ref === app ? '' : `Frameworks/${owner.module.moduleName}.framework/`
2097
2412
  const bundlePath = prefix + destination.split(path.sep).join('/')
@@ -2101,8 +2416,24 @@ export function readXcodeAppTarget(
2101
2416
  )
2102
2417
  resourceProducts.push({
2103
2418
  path: bundlePath,
2104
- resources: product.module.resources,
2105
- infoPlist,
2419
+ ...(product
2420
+ ? {
2421
+ resources: product.module.resources,
2422
+ infoPlist: plist.build(
2423
+ expandValue(
2424
+ plist.parse(fs.readFileSync(infoFile!, 'utf8')),
2425
+ product.settings,
2426
+ ),
2427
+ ),
2428
+ }
2429
+ : {
2430
+ resources: fs
2431
+ .readdirSync(input, { recursive: true, withFileTypes: true })
2432
+ .filter((entry) => entry.isFile())
2433
+ .map((entry) => path.join(entry.parentPath, entry.name))
2434
+ .sort(),
2435
+ sourceRoot: input,
2436
+ }),
2106
2437
  })
2107
2438
  }
2108
2439
  }
@@ -2206,7 +2537,7 @@ export function readXcodeAppTarget(
2206
2537
  const qualifiedProductKeys = new Set<string>()
2207
2538
  const linkedProductKeys = new Set<string>()
2208
2539
  const binaryFrameworks = new Map<string, string | null>()
2209
- for (const { ref, settings } of builtTargets) {
2540
+ for (const { ref, settings } of selectedTargets) {
2210
2541
  const absolute = (raw: string) =>
2211
2542
  path.resolve(ref.project.projectDir, expand(raw, settings))
2212
2543
  // standalone clang modules are imported through swift's -I paths, even
@@ -2239,12 +2570,16 @@ export function readXcodeAppTarget(
2239
2570
  const productsByTarget = new Map<TargetRef, SwiftLinkedProduct[]>()
2240
2571
  for (const ref of order) {
2241
2572
  const { project, target } = ref
2573
+ const productPlatforms = new Map<string, boolean>()
2242
2574
  const productRef = (id: string) => {
2243
- const ref = str(project.object(id)?.productRef)
2244
- return ref ? [ref] : []
2575
+ const entry = project.object(id)
2576
+ const ref = str(entry?.productRef)
2577
+ if (!entry || !ref) return []
2578
+ const builds = xcodeBuildFileBuildsForIos(entry)
2579
+ productPlatforms.set(ref, productPlatforms.get(ref) === true || builds)
2580
+ return builds ? [ref] : []
2245
2581
  }
2246
- const productDependencies = [
2247
- ...list(target.packageProductDependencies),
2582
+ const referencedProducts = [
2248
2583
  ...list(target.dependencies).flatMap(productRef),
2249
2584
  ...list(target.buildPhases).flatMap((id) => {
2250
2585
  const phase = project.object(id)
@@ -2253,6 +2588,14 @@ export function readXcodeAppTarget(
2253
2588
  : []
2254
2589
  }),
2255
2590
  ]
2591
+ // the target lists every package product, including products linked only
2592
+ // on another platform. an inactive link must not reenter through that list.
2593
+ const productDependencies = [
2594
+ ...list(target.packageProductDependencies).filter(
2595
+ (id) => productPlatforms.get(id) !== false,
2596
+ ),
2597
+ ...referencedProducts,
2598
+ ]
2256
2599
  const ownProducts: SwiftLinkedProduct[] = []
2257
2600
  const ownKeys = new Set<string>()
2258
2601
  for (const dependencyId of new Set(productDependencies)) {
@@ -2294,7 +2637,9 @@ export function readXcodeAppTarget(
2294
2637
  const phase = project.object(phaseId)
2295
2638
  if (phase?.isa !== 'PBXFrameworksBuildPhase') continue
2296
2639
  for (const buildFileId of list(phase.files)) {
2297
- const fileId = str(project.object(buildFileId)?.fileRef)
2640
+ const buildFile = project.object(buildFileId)
2641
+ if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue
2642
+ const fileId = str(buildFile.fileRef)
2298
2643
  const file = project.object(fileId)
2299
2644
  const tree = str(file?.sourceTree)
2300
2645
  const rawPath = str(file?.path) ?? ''
@@ -2338,16 +2683,10 @@ export function readXcodeAppTarget(
2338
2683
  for (const built of builtTargets)
2339
2684
  built.module.packageProducts = productsByTarget.get(built.ref) ?? []
2340
2685
 
2341
- // xcode keeps the pins in the workspace it opened: the named one, or the project's own
2342
- const resolvedFile = path.join(
2343
- workspace ?? path.join(xcodeprojOrWorkspace, 'project.xcworkspace'),
2344
- 'xcshareddata',
2345
- 'swiftpm',
2346
- 'Package.resolved',
2347
- )
2686
+ const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace)
2348
2687
 
2349
2688
  // a workspace lock is authoritative. otherwise local package locks. with
2350
- // neither, xcode resolves the remote requirements and writes the lock.
2689
+ // neither, a compiling read throws until the async resolve has written it.
2351
2690
  let packageResolved = fs.existsSync(resolvedFile)
2352
2691
  ? [fs.realpathSync(resolvedFile)]
2353
2692
  : [...new Set(localPackageDirs.map((dir) => path.join(dir, 'Package.resolved')))]
@@ -2357,8 +2696,8 @@ export function readXcodeAppTarget(
2357
2696
  if (packageResolved.length === 0) {
2358
2697
  const requirements = remotePackageRequirements(projects)
2359
2698
  if (requirements.length > 0) {
2360
- resolveSwiftPackageRequirements(requirements, resolvedFile)
2361
- packageResolved = [fs.realpathSync(resolvedFile)]
2699
+ if (options.deferPackageResolution)
2700
+ throw new SwiftPackageResolutionRequired(requirements, resolvedFile)
2362
2701
  }
2363
2702
  }
2364
2703
 
@@ -2366,6 +2705,23 @@ export function readXcodeAppTarget(
2366
2705
  const used = order.map((ref) => ref.project)
2367
2706
  return {
2368
2707
  ...module,
2708
+ moduleMapSources: Object.fromEntries(
2709
+ builtTargets.flatMap(({ module }) => {
2710
+ const compatibility = module.swift?.compatibility
2711
+ return compatibility
2712
+ ? [[compatibility.outputModuleMap, compatibility.moduleMap]]
2713
+ : []
2714
+ }),
2715
+ ),
2716
+ ...(options.nativeModules
2717
+ ? {
2718
+ sources: [],
2719
+ allSources: [],
2720
+ resources: [],
2721
+ objc: undefined,
2722
+ swift: undefined,
2723
+ }
2724
+ : {}),
2369
2725
  rootDir: commonAncestor(
2370
2726
  [
2371
2727
  workspace ? path.dirname(workspace) : app.project.projectDir,