peachsim 0.1.1660 → 0.1.1673

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 (515) hide show
  1. package/README.md +8 -1
  2. package/cli/bridge-flow-runner.ts +6 -3
  3. package/cli/commands/box.ts +2 -0
  4. package/cli/commands/control.ts +56 -17
  5. package/cli/commands/coverage-swift.ts +291 -0
  6. package/cli/commands/coverage.ts +168 -24
  7. package/cli/commands/debug.ts +100 -9
  8. package/cli/commands/diagnose.ts +1 -19
  9. package/cli/commands/flow.ts +2 -2
  10. package/cli/commands/inspect/settle.ts +4 -2
  11. package/cli/commands/inspect/settling.ts +17 -14
  12. package/cli/commands/platform.ts +3 -0
  13. package/cli/commands/react.ts +3 -18
  14. package/cli/commands/screenshot.ts +1 -1
  15. package/cli/commands/screenshots-capture.ts +1 -1
  16. package/cli/current-sim.ts +21 -1
  17. package/cli/dev-build-freshness.ts +36 -2
  18. package/cli/drivers/playwright-provisioning.ts +1 -4
  19. package/cli/drivers/playwright.ts +15 -1
  20. package/cli/maestro-compare.ts +44 -14
  21. package/cli/main.ts +3 -0
  22. package/cli/material-symbol-fonts.ts +3 -100
  23. package/cli/output-redaction.ts +21 -6
  24. package/cli/parent-pid.ts +2 -2
  25. package/cli/scene-video.ts +1 -1
  26. package/cli/ui.ts +20 -0
  27. package/cli/ws-bridge.ts +26 -37
  28. package/detox/frame-identity.cjs +21 -0
  29. package/detox/frame-identity.d.cts +6 -0
  30. package/detox/index.ts +39 -33
  31. package/detox/jest-environment.cjs +4 -1
  32. package/detox/jest-setup-after-env.cjs +0 -4
  33. package/detox/navigation-lifecycle.ts +2 -2
  34. package/detox/proof-observer.ts +126 -0
  35. package/dist-lib/agent-daemon-client.cjs +29 -1
  36. package/dist-lib/agent-events.cjs +1 -1
  37. package/dist-lib/attached-projects.cjs +10 -1
  38. package/dist-lib/auth/shared-session.cjs +1 -1
  39. package/dist-lib/backend-origin.cjs +1 -1
  40. package/dist-lib/beta.cjs +1 -1
  41. package/dist-lib/beta.mjs +1 -1
  42. package/dist-lib/bridge-constants.cjs +1 -1
  43. package/dist-lib/bridge-contract-input.cjs +1 -1
  44. package/dist-lib/bridge-contract-input.mjs +1 -1
  45. package/dist-lib/bridge-contract.cjs +1 -1
  46. package/dist-lib/bridge-contract.mjs +1 -1
  47. package/dist-lib/bundle-channel.cjs +2581 -27346
  48. package/dist-lib/capture-contract.cjs +1 -1
  49. package/dist-lib/capture-contract.mjs +1 -1
  50. package/dist-lib/cloud-contract.cjs +1 -1
  51. package/dist-lib/cloud-contract.mjs +1 -1
  52. package/dist-lib/cloud-test-args.cjs +1 -1
  53. package/dist-lib/cloud-test-args.mjs +1 -1
  54. package/dist-lib/cloud.cjs +1 -1
  55. package/dist-lib/cloud.mjs +1 -1
  56. package/dist-lib/config.cjs +1 -1
  57. package/dist-lib/config.mjs +1 -1
  58. package/dist-lib/detox/index.cjs +2752 -4982
  59. package/dist-lib/detox/jest-environment.cjs +4 -1
  60. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  61. package/dist-lib/expo-swift-bundle.cjs +2272 -27004
  62. package/dist-lib/expo-swift-metadata.cjs +1 -1
  63. package/dist-lib/expo-swift-metadata.mjs +1 -1
  64. package/dist-lib/home-paths.cjs +1 -1
  65. package/dist-lib/host/bridge-host.cjs +2801 -27484
  66. package/dist-lib/host/fetch-proxy-handler.cjs +7 -7
  67. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  68. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  69. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  70. package/dist-lib/host/websocket-proxy.cjs +1 -1
  71. package/dist-lib/index.cjs +394 -49
  72. package/dist-lib/jump-to-source-babel.cjs +1 -1
  73. package/dist-lib/jump-to-source-native.cjs +1 -1
  74. package/dist-lib/kotlin-host.cjs +1 -1
  75. package/dist-lib/menu.cjs +1 -1
  76. package/dist-lib/menu.mjs +1 -1
  77. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  78. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  79. package/dist-lib/metro-production-bundle.cjs +10 -1
  80. package/dist-lib/metro-production-bundle.mjs +12 -1
  81. package/dist-lib/metro.cjs +235 -13
  82. package/dist-lib/native-app-identity-project.cjs +123 -13
  83. package/dist-lib/native-app-identity-project.mjs +123 -13
  84. package/dist-lib/native-app-identity.cjs +1 -1
  85. package/dist-lib/native-app-identity.mjs +1 -1
  86. package/dist-lib/native-firebase-metadata.cjs +1 -1
  87. package/dist-lib/native-firebase-metadata.mjs +1 -1
  88. package/dist-lib/plist.cjs +1 -1
  89. package/dist-lib/plist.mjs +1 -1
  90. package/dist-lib/profiles.cjs +21 -1
  91. package/dist-lib/public-brand.cjs +1 -1
  92. package/dist-lib/public-origins-lib-esm.json +76 -28
  93. package/dist-lib/public-origins-lib-static.json +1 -1
  94. package/dist-lib/public-origins-lib.json +590 -184
  95. package/dist-lib/react-native-host-modules.cjs +1 -1
  96. package/dist-lib/react-native-host-modules.mjs +1 -1
  97. package/dist-lib/reap-browser.cjs +964 -0
  98. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  99. package/dist-lib/sdk.cjs +18 -15
  100. package/dist-lib/sdk.mjs +18 -15
  101. package/dist-lib/skills.cjs +3900 -28409
  102. package/dist-lib/swift-compile.cjs +1227 -26292
  103. package/dist-lib/swift-compile.mjs +1156 -26221
  104. package/dist-lib/swift-package.cjs +34 -4
  105. package/dist-lib/swift-package.mjs +33 -4
  106. package/dist-lib/swift-submit.cjs +2 -2
  107. package/dist-lib/swift-submit.mjs +2 -2
  108. package/dist-lib/swift-toolchain.cjs +52 -44
  109. package/dist-lib/swift.cjs +1 -1
  110. package/dist-lib/vite-swift.cjs +2317 -26955
  111. package/dist-lib/vite.cjs +132 -21
  112. package/dist-lib/worklet-executable.cjs +1 -1
  113. package/dist-lib/worklet-executable.mjs +1 -1
  114. package/dist-types/packages/peach-engine/src/demo/demo-bundle-platform.d.ts +29 -0
  115. package/dist-types/packages/peach-engine/src/engine/app-font-registry.d.ts +13 -1
  116. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +24 -0
  117. package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +73 -0
  118. package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +2 -3
  119. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +21 -3
  120. package/dist-types/packages/peach-engine/src/engine/inspect-outline.d.ts +2 -1
  121. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -4
  122. package/dist-types/packages/peach-engine/src/engine/node.d.ts +0 -1
  123. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +3 -1
  124. package/dist-types/packages/peach-engine/src/ios/aux-shell-animated-sources.d.ts +6 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +68 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +11 -0
  127. package/dist-types/packages/peach-engine/src/render-worker/nativeSyncReplyContract.d.ts +1 -0
  128. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +8 -1
  129. package/dist-types/packages/peach-engine/src/render-worker/shell-scene-schema.d.ts +10 -2
  130. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +24 -0
  131. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +7 -2
  132. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -0
  133. package/dist-types/packages/peach-globals/src/accessibilityBridgeContract.d.ts +11 -0
  134. package/dist-types/packages/peach-globals/src/androidDateTimePickerBridgeContract.d.ts +41 -0
  135. package/dist-types/packages/peach-globals/src/appLifecycleBridgeContract.d.ts +22 -0
  136. package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +33 -0
  137. package/dist-types/packages/peach-globals/src/bridgeContract.d.ts +1 -0
  138. package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +94 -0
  139. package/dist-types/packages/peach-globals/src/captureBridgeContract.d.ts +36 -0
  140. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +45 -0
  141. package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +31 -0
  142. package/dist-types/packages/peach-globals/src/debugBridgeContract.d.ts +27 -0
  143. package/dist-types/packages/peach-globals/src/electronBridgeContract.d.ts +29 -0
  144. package/dist-types/packages/peach-globals/src/eventBridgeContract.d.ts +200 -0
  145. package/dist-types/packages/peach-globals/src/globalsContract.d.ts +462 -0
  146. package/dist-types/packages/peach-globals/src/hostStorageBridgeContract.d.ts +3 -0
  147. package/dist-types/packages/peach-globals/src/imagePickerBridgeContract.d.ts +47 -0
  148. package/dist-types/packages/peach-globals/src/index.d.ts +47 -3343
  149. package/dist-types/packages/peach-globals/src/interactionBridgeContract.d.ts +21 -0
  150. package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +44 -0
  151. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +77 -0
  152. package/dist-types/packages/peach-globals/src/nativeViewContract.d.ts +28 -0
  153. package/dist-types/packages/peach-globals/src/navigationBridgeContract.d.ts +11 -0
  154. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +665 -0
  155. package/dist-types/packages/peach-globals/src/performanceBridgeContract.d.ts +100 -0
  156. package/dist-types/packages/peach-globals/src/permissionsBridgeContract.d.ts +152 -0
  157. package/dist-types/packages/peach-globals/src/photoLibraryBridgeContract.d.ts +36 -0
  158. package/dist-types/packages/peach-globals/src/portalBridgeContract.d.ts +9 -0
  159. package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +131 -0
  160. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +125 -0
  161. package/dist-types/packages/peach-globals/src/sceneStreamBridgeContract.d.ts +37 -0
  162. package/dist-types/packages/peach-globals/src/settingsBridgeContract.d.ts +7 -0
  163. package/dist-types/packages/peach-globals/src/shareSheetBridgeContract.d.ts +14 -0
  164. package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +82 -0
  165. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +28 -0
  166. package/dist-types/packages/peach-globals/src/speechSynthesisBridgeContract.d.ts +25 -0
  167. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +278 -0
  168. package/dist-types/packages/peach-globals/src/timelineBridgeContract.d.ts +58 -0
  169. package/dist-types/packages/peach-globals/src/videoBridgeContract.d.ts +80 -0
  170. package/dist-types/packages/peach-globals/src/webViewBridgeContract.d.ts +331 -0
  171. package/dist-types/packages/peach-globals/src/windowBridgeContract.d.ts +5 -0
  172. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  173. package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +3 -5
  174. package/package.json +2 -1
  175. package/runtime-companion.json +1 -1
  176. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAsset.h +20 -0
  177. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVAsynchronousKeyValueLoading.h +15 -0
  178. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h +5 -0
  179. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMetadataFormat.h +13 -0
  180. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVMetadataItem.h +16 -0
  181. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Headers/AVTimedMetadataGroup.h +13 -0
  182. package/sdk/ios/System/Library/Frameworks/AVFoundation.framework/Modules/module.modulemap +4 -0
  183. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +19 -0
  184. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +11 -0
  185. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +17 -0
  186. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +13 -0
  187. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +307 -0
  188. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +174 -0
  189. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +7 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h +5 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h +21 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSFetchedResultsController.h +39 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObject.h +10 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h +9 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectID.h +7 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectModel.h +5 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreCoordinator.h +5 -0
  198. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreRequest.h +5 -0
  199. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Modules/module.modulemap +5 -0
  200. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +2 -0
  201. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +221 -0
  202. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h +2 -0
  203. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +316 -0
  204. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +4 -0
  205. package/sdk/ios/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h +46 -0
  206. package/sdk/ios/System/Library/Frameworks/CoreImage.framework/Modules/module.modulemap +4 -0
  207. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMTime.h +31 -0
  208. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CMTimeRange.h +8 -0
  209. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h +3 -0
  210. package/sdk/ios/System/Library/Frameworks/CoreMedia.framework/Modules/module.modulemap +4 -0
  211. package/sdk/ios/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h +12 -0
  212. package/sdk/ios/System/Library/Frameworks/CoreServices.framework/Headers/UTCoreTypes.h +1276 -0
  213. package/sdk/ios/System/Library/Frameworks/CoreServices.framework/Headers/UTType.h +644 -0
  214. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h +20 -0
  215. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h +2 -0
  216. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Modules/module.modulemap +4 -0
  217. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +1441 -0
  218. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Modules/module.modulemap +4 -0
  219. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h +106 -0
  220. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageDestination.h +429 -0
  221. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageMetadata.h +665 -0
  222. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h +2504 -0
  223. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/CGImageSource.h +634 -0
  224. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h +22 -0
  225. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Headers/ImageIOBase.h +18 -0
  226. package/sdk/ios/System/Library/Frameworks/ImageIO.framework/Modules/module.modulemap +4 -0
  227. package/sdk/ios/System/Library/Frameworks/MobileCoreServices.framework/Headers/MobileCoreServices.h +9 -0
  228. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +40 -0
  229. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +4 -0
  230. package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h +14 -0
  231. package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewControllerConfiguration.h +9 -0
  232. package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SafariServices.h +2 -0
  233. package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Modules/module.modulemap +5 -0
  234. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +3 -0
  235. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +30 -0
  236. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +3 -0
  237. package/sdk/ios/System/Library/Frameworks/Security.framework/Modules/module.modulemap +5 -0
  238. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStore.h +439 -0
  239. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreCopySpecific.h +216 -0
  240. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreKey.h +267 -0
  241. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetwork.h +204 -0
  242. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConfiguration.h +1393 -0
  243. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConnection.h +568 -0
  244. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkReachability.h +369 -0
  245. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h +473 -0
  246. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesPath.h +179 -0
  247. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesSetSpecific.h +95 -0
  248. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCSchemaDefinitions.h +2395 -0
  249. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h +184 -0
  250. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAppearance.h +5 -0
  251. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h +2 -0
  252. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +817 -0
  253. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Modules/module.modulemap +4 -0
  254. package/sdk/ios/usr/include/Availability.h +630 -0
  255. package/sdk/ios/usr/include/AvailabilityInternal.h +556 -0
  256. package/sdk/ios/usr/include/AvailabilityInternalLegacy.h +4346 -0
  257. package/sdk/ios/usr/include/AvailabilityVersions.h +547 -0
  258. package/sdk/ios/usr/include/CommonCrypto/CommonDigest.h +130 -0
  259. package/sdk/ios/usr/include/MacTypes.h +3 -0
  260. package/sdk/ios/usr/include/TargetConditionals.h +14 -0
  261. package/sdk/ios/usr/include/__xlocale.h +41 -0
  262. package/sdk/ios/usr/include/_bounds.h +67 -0
  263. package/sdk/ios/usr/include/_ctermid.h +42 -0
  264. package/sdk/ios/usr/include/_mb_cur_max.h +39 -0
  265. package/sdk/ios/usr/include/_printf.h +38 -0
  266. package/sdk/ios/usr/include/_stdio.h +510 -0
  267. package/sdk/ios/usr/include/_types/_intmax_t.h +40 -0
  268. package/sdk/ios/usr/include/_types/_locale_t.h +38 -0
  269. package/sdk/ios/usr/include/_types/_uint16_t.h +32 -0
  270. package/sdk/ios/usr/include/_types/_uint32_t.h +32 -0
  271. package/sdk/ios/usr/include/_types/_uint64_t.h +32 -0
  272. package/sdk/ios/usr/include/_types/_uint8_t.h +32 -0
  273. package/sdk/ios/usr/include/_types/_uintmax_t.h +40 -0
  274. package/sdk/ios/usr/include/_types.h +72 -0
  275. package/sdk/ios/usr/include/arm/_endian.h +105 -0
  276. package/sdk/ios/usr/include/arm/_mcontext.h +95 -0
  277. package/sdk/ios/usr/include/arm/_param.h +25 -0
  278. package/sdk/ios/usr/include/arm/_types.h +125 -0
  279. package/sdk/ios/usr/include/arm/endian.h +65 -0
  280. package/sdk/ios/usr/include/arm/signal.h +22 -0
  281. package/sdk/ios/usr/include/arm/types.h +110 -0
  282. package/sdk/ios/usr/include/asl.h +160 -0
  283. package/sdk/ios/usr/include/assert.h +14 -0
  284. package/sdk/ios/usr/include/dirent.h +224 -0
  285. package/sdk/ios/usr/include/dispatch/dispatch.h +114 -0
  286. package/sdk/ios/usr/include/dlfcn.h +16 -0
  287. package/sdk/ios/usr/include/errno.h +24 -0
  288. package/sdk/ios/usr/include/execinfo.h +11 -0
  289. package/sdk/ios/usr/include/fcntl.h +23 -0
  290. package/sdk/ios/usr/include/i386/_endian.h +105 -0
  291. package/sdk/ios/usr/include/i386/_mcontext.h +216 -0
  292. package/sdk/ios/usr/include/i386/_param.h +49 -0
  293. package/sdk/ios/usr/include/i386/_types.h +149 -0
  294. package/sdk/ios/usr/include/i386/endian.h +89 -0
  295. package/sdk/ios/usr/include/i386/signal.h +47 -0
  296. package/sdk/ios/usr/include/libkern/OSAtomic.h +51 -0
  297. package/sdk/ios/usr/include/libkern/OSAtomicDeprecated.h +1267 -0
  298. package/sdk/ios/usr/include/libkern/OSAtomicQueue.h +115 -0
  299. package/sdk/ios/usr/include/libkern/OSByteOrder.h +315 -0
  300. package/sdk/ios/usr/include/libkern/OSSpinLockDeprecated.h +212 -0
  301. package/sdk/ios/usr/include/libkern/_OSByteOrder.h +125 -0
  302. package/sdk/ios/usr/include/libkern/arm/_OSByteOrder.h +99 -0
  303. package/sdk/ios/usr/include/libkern/i386/_OSByteOrder.h +110 -0
  304. package/sdk/ios/usr/include/libkern/machine/OSByteOrder.h +147 -0
  305. package/sdk/ios/usr/include/limits.h +4 -0
  306. package/sdk/ios/usr/include/mach/arm/_structs.h +741 -0
  307. package/sdk/ios/usr/include/mach/boolean.h +4 -0
  308. package/sdk/ios/usr/include/mach/exception_types.h +40 -0
  309. package/sdk/ios/usr/include/mach/host_info.h +200 -0
  310. package/sdk/ios/usr/include/mach/i386/_structs.h +1316 -0
  311. package/sdk/ios/usr/include/mach/kern_return.h +61 -0
  312. package/sdk/ios/usr/include/mach/mach.h +16 -0
  313. package/sdk/ios/usr/include/mach/mach_error.h +10 -0
  314. package/sdk/ios/usr/include/mach/mach_host.h +18 -0
  315. package/sdk/ios/usr/include/mach/mach_init.h +15 -0
  316. package/sdk/ios/usr/include/mach/mach_port.h +11 -0
  317. package/sdk/ios/usr/include/mach/mach_time.h +14 -0
  318. package/sdk/ios/usr/include/mach/mach_types.h +20 -0
  319. package/sdk/ios/usr/include/mach/machine/_structs.h +40 -0
  320. package/sdk/ios/usr/include/mach/machine.h +144 -0
  321. package/sdk/ios/usr/include/mach/task.h +14 -0
  322. package/sdk/ios/usr/include/mach/task_info.h +23 -0
  323. package/sdk/ios/usr/include/mach/task_policy.h +29 -0
  324. package/sdk/ios/usr/include/mach/thread_act.h +12 -0
  325. package/sdk/ios/usr/include/mach/thread_info.h +32 -0
  326. package/sdk/ios/usr/include/mach/time_value.h +4 -0
  327. package/sdk/ios/usr/include/mach/vm_prot.h +8 -0
  328. package/sdk/ios/usr/include/mach/vm_region.h +43 -0
  329. package/sdk/ios/usr/include/mach/vm_statistics.h +491 -0
  330. package/sdk/ios/usr/include/mach/vm_types.h +8 -0
  331. package/sdk/ios/usr/include/mach-o/arch.h +21 -0
  332. package/sdk/ios/usr/include/mach-o/dyld.h +16 -0
  333. package/sdk/ios/usr/include/mach-o/dyld_images.h +71 -0
  334. package/sdk/ios/usr/include/mach-o/getsect.h +17 -0
  335. package/sdk/ios/usr/include/mach-o/loader.h +158 -0
  336. package/sdk/ios/usr/include/mach-o/nlist.h +38 -0
  337. package/sdk/ios/usr/include/mach-o/stab.h +33 -0
  338. package/sdk/ios/usr/include/mach-o/utils.h +10 -0
  339. package/sdk/ios/usr/include/machine/_endian.h +42 -0
  340. package/sdk/ios/usr/include/machine/_mcontext.h +39 -0
  341. package/sdk/ios/usr/include/machine/_param.h +39 -0
  342. package/sdk/ios/usr/include/machine/_types.h +39 -0
  343. package/sdk/ios/usr/include/machine/endian.h +42 -0
  344. package/sdk/ios/usr/include/machine/signal.h +39 -0
  345. package/sdk/ios/usr/include/machine/types.h +42 -0
  346. package/sdk/ios/usr/include/math.h +5 -0
  347. package/sdk/ios/usr/include/module.modulemap +4 -0
  348. package/sdk/ios/usr/include/net/if.h +20 -0
  349. package/sdk/ios/usr/include/net/if_dl.h +10 -0
  350. package/sdk/ios/usr/include/net/if_var.h +15 -0
  351. package/sdk/ios/usr/include/net/net_kev.h +100 -0
  352. package/sdk/ios/usr/include/netdb.h +5 -0
  353. package/sdk/ios/usr/include/netinet/in.h +670 -0
  354. package/sdk/ios/usr/include/netinet6/in6.h +676 -0
  355. package/sdk/ios/usr/include/notify.h +45 -0
  356. package/sdk/ios/usr/include/notify_keys.h +17 -0
  357. package/sdk/ios/usr/include/objc/NSObject.h +79 -0
  358. package/sdk/ios/usr/include/os/availability.h +140 -0
  359. package/sdk/ios/usr/include/os/lock.h +24 -0
  360. package/sdk/ios/usr/include/os/log.h +77 -0
  361. package/sdk/ios/usr/include/os/object.h +13 -0
  362. package/sdk/ios/usr/include/peach/darwin.h +6 -0
  363. package/sdk/ios/usr/include/peach/netdb.h +316 -0
  364. package/sdk/ios/usr/include/peach/pthread.h +19 -0
  365. package/sdk/ios/usr/include/pthread.h +4 -0
  366. package/sdk/ios/usr/include/secure/_common.h +45 -0
  367. package/sdk/ios/usr/include/secure/_stdio.h +130 -0
  368. package/sdk/ios/usr/include/signal.h +132 -0
  369. package/sdk/ios/usr/include/stdint.h +205 -0
  370. package/sdk/ios/usr/include/stdio.h +65 -0
  371. package/sdk/ios/usr/include/stdlib.h +17 -0
  372. package/sdk/ios/usr/include/string.h +8 -0
  373. package/sdk/ios/usr/include/sys/__endian.h +108 -0
  374. package/sdk/ios/usr/include/sys/_endian.h +152 -0
  375. package/sdk/ios/usr/include/sys/_posix_availability.h +73 -0
  376. package/sdk/ios/usr/include/sys/_pthread/_pthread_attr_t.h +32 -0
  377. package/sdk/ios/usr/include/sys/_pthread/_pthread_t.h +32 -0
  378. package/sdk/ios/usr/include/sys/_pthread/_pthread_types.h +120 -0
  379. package/sdk/ios/usr/include/sys/_symbol_aliasing.h +1093 -0
  380. package/sdk/ios/usr/include/sys/_types/_errno_t.h +31 -0
  381. package/sdk/ios/usr/include/sys/_types/_filesec_t.h +32 -0
  382. package/sdk/ios/usr/include/sys/_types/_gid_t.h +32 -0
  383. package/sdk/ios/usr/include/sys/_types/_in_addr_t.h +32 -0
  384. package/sdk/ios/usr/include/sys/_types/_in_port_t.h +32 -0
  385. package/sdk/ios/usr/include/sys/_types/_ino_t.h +32 -0
  386. package/sdk/ios/usr/include/sys/_types/_int16_t.h +31 -0
  387. package/sdk/ios/usr/include/sys/_types/_int32_t.h +31 -0
  388. package/sdk/ios/usr/include/sys/_types/_int64_t.h +31 -0
  389. package/sdk/ios/usr/include/sys/_types/_int8_t.h +31 -0
  390. package/sdk/ios/usr/include/sys/_types/_intptr_t.h +33 -0
  391. package/sdk/ios/usr/include/sys/_types/_iovec_t.h +35 -0
  392. package/sdk/ios/usr/include/sys/_types/_mode_t.h +32 -0
  393. package/sdk/ios/usr/include/sys/_types/_null.h +54 -0
  394. package/sdk/ios/usr/include/sys/_types/_o_dsync.h +30 -0
  395. package/sdk/ios/usr/include/sys/_types/_o_sync.h +30 -0
  396. package/sdk/ios/usr/include/sys/_types/_off_t.h +32 -0
  397. package/sdk/ios/usr/include/sys/_types/_pid_t.h +32 -0
  398. package/sdk/ios/usr/include/sys/_types/_ptrdiff_t.h +56 -0
  399. package/sdk/ios/usr/include/sys/_types/_s_ifmt.h +74 -0
  400. package/sdk/ios/usr/include/sys/_types/_sa_family_t.h +32 -0
  401. package/sdk/ios/usr/include/sys/_types/_seek_set.h +51 -0
  402. package/sdk/ios/usr/include/sys/_types/_sigaltstack.h +50 -0
  403. package/sdk/ios/usr/include/sys/_types/_sigset_t.h +32 -0
  404. package/sdk/ios/usr/include/sys/_types/_size_t.h +56 -0
  405. package/sdk/ios/usr/include/sys/_types/_socklen_t.h +32 -0
  406. package/sdk/ios/usr/include/sys/_types/_ssize_t.h +32 -0
  407. package/sdk/ios/usr/include/sys/_types/_timespec.h +38 -0
  408. package/sdk/ios/usr/include/sys/_types/_timeval32.h +3 -0
  409. package/sdk/ios/usr/include/sys/_types/_u_int16_t.h +31 -0
  410. package/sdk/ios/usr/include/sys/_types/_u_int32_t.h +31 -0
  411. package/sdk/ios/usr/include/sys/_types/_u_int64_t.h +31 -0
  412. package/sdk/ios/usr/include/sys/_types/_u_int8_t.h +31 -0
  413. package/sdk/ios/usr/include/sys/_types/_ucontext.h +59 -0
  414. package/sdk/ios/usr/include/sys/_types/_uid_t.h +32 -0
  415. package/sdk/ios/usr/include/sys/_types/_uintptr_t.h +37 -0
  416. package/sdk/ios/usr/include/sys/_types/_va_list.h +49 -0
  417. package/sdk/ios/usr/include/sys/_types/_wchar_t.h +59 -0
  418. package/sdk/ios/usr/include/sys/_types.h +103 -0
  419. package/sdk/ios/usr/include/sys/appleapiopts.h +61 -0
  420. package/sdk/ios/usr/include/sys/cdefs.h +341 -0
  421. package/sdk/ios/usr/include/sys/constrained_ctypes.h +622 -0
  422. package/sdk/ios/usr/include/sys/dirent.h +141 -0
  423. package/sdk/ios/usr/include/sys/errno.h +271 -0
  424. package/sdk/ios/usr/include/sys/fcntl.h +649 -0
  425. package/sdk/ios/usr/include/sys/mman.h +273 -0
  426. package/sdk/ios/usr/include/sys/proc.h +65 -0
  427. package/sdk/ios/usr/include/sys/qos.h +61 -0
  428. package/sdk/ios/usr/include/sys/signal.h +394 -0
  429. package/sdk/ios/usr/include/sys/socket.h +752 -0
  430. package/sdk/ios/usr/include/sys/stdio.h +61 -0
  431. package/sdk/ios/usr/include/sys/sysctl.h +74 -0
  432. package/sdk/ios/usr/include/sys/syslimits.h +11 -0
  433. package/sdk/ios/usr/include/sys/time.h +5 -0
  434. package/sdk/ios/usr/include/sys/types.h +21 -0
  435. package/sdk/ios/usr/include/sys/ucontext.h +41 -0
  436. package/sdk/ios/usr/include/sys/xattr.h +50 -0
  437. package/sdk/ios/usr/include/time.h +2 -0
  438. package/sdk/ios/usr/include/unistd.h +3 -0
  439. package/sdk/ios/usr/include/uuid/uuid.h +19 -0
  440. package/sdk/ios/usr/include/xlocale/_stdio.h +85 -0
  441. package/sdk/ios/usr/lib/swift/CoreGraphics.swiftmodule/arm64-apple-ios-simulator.swiftinterface +8 -0
  442. package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +51 -0
  443. package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +20 -0
  444. package/sdk/ios/wasm/include/dlfcn.h +3 -0
  445. package/sdk/ios/wasm/include/netdb.h +4 -0
  446. package/sdk/ios/wasm/include/pthread.h +3 -0
  447. package/sdk/ios/wasm/include/stdlib.h +3 -0
  448. package/sdk/ios/wasm/include/string.h +3 -0
  449. package/sdk/ios/wasm/include/sys/socket.h +7 -0
  450. package/sdk/ios/wasm/include/sys/types.h +4 -0
  451. package/sdk/ios/wasm/include/sys/ucontext.h +38 -0
  452. package/src/bridge-contract.ts +42 -0
  453. package/src/chromium-admission.ts +196 -0
  454. package/src/cli-runtime.ts +5 -5
  455. package/src/conformance-comparison-contract.ts +146 -0
  456. package/src/conformance-pixel-comparison.ts +327 -0
  457. package/src/device-catalog.ts +12 -3
  458. package/src/host/bridge-host.ts +6 -43
  459. package/src/launch-deadline.ts +74 -0
  460. package/src/material-symbol-fonts.ts +107 -0
  461. package/src/nitro-adapter.lock.json +3 -3
  462. package/src/profiles.ts +21 -0
  463. package/src/react-native-coverage/capability-reference-resolution.ts +402 -0
  464. package/src/react-native-coverage/capability-source-references.ts +1296 -0
  465. package/src/react-native-coverage/native-typescript-parser.ts +74 -0
  466. package/src/react-native-coverage/project-aliases.ts +207 -0
  467. package/src/react-native-coverage/verified-reach.ts +47 -0
  468. package/src/reap-browser.ts +1019 -0
  469. package/src/skills/builtin/a11y-review.ts +1 -1
  470. package/src/skills/builtin/perf-profile.ts +1 -1
  471. package/src/skills/builtin/screenshot-all.ts +1 -1
  472. package/src/skills/builtin/visual-diff.ts +1 -1
  473. package/src/swift-compile.ts +584 -226
  474. package/src/swift-compiler-digest.ts +6 -2
  475. package/src/swift-coverage/indexdump.ts +80 -0
  476. package/src/swift-coverage/indexing.ts +147 -0
  477. package/src/swift-coverage/package.ts +230 -0
  478. package/src/swift-coverage/provenance.ts +47 -0
  479. package/src/swift-coverage/reader.ts +81 -0
  480. package/src/swift-coverage/source.ts +252 -0
  481. package/src/swift-coverage/types.ts +58 -0
  482. package/src/swift-coverage/xcode-assets.ts +175 -0
  483. package/src/swift-coverage/xcode-bridging.ts +160 -0
  484. package/src/swift-coverage/xcode-packages.ts +251 -0
  485. package/src/swift-coverage/xcode-strings.ts +78 -0
  486. package/src/swift-coverage/xcode.ts +656 -0
  487. package/src/swift-distribution.lock.json +8 -8
  488. package/src/swift-distribution.ts +2 -1
  489. package/src/swift-host.ts +47 -4
  490. package/src/swift-objc-compile.ts +72 -97
  491. package/src/swift-objc-import.ts +238 -38
  492. package/src/swift-objc-metadata.ts +54 -7
  493. package/src/swift-objc-sdk-tree.ts +17 -0
  494. package/src/swift-objc-sdk.ts +27 -25677
  495. package/src/swift-objc-standin.ts +4 -2
  496. package/src/swift-package-manifest.ts +134 -13
  497. package/src/swift-package.ts +46 -4
  498. package/src/swift-standins.ts +2 -2
  499. package/src/swift-submit.ts +2 -1
  500. package/src/swift-toolchain.ts +72 -61
  501. package/src/swift-vite-lifetime.ts +42 -0
  502. package/src/swiftContract.ts +54 -0
  503. package/src/vite-plugin-one.ts +36 -15
  504. package/src/vite-plugin-swift.ts +21 -2
  505. package/src/worker-system-chunks.ts +3 -10
  506. package/src/xcode-header-search.ts +114 -0
  507. package/src/xcode-project.ts +108 -14
  508. package/detox/attempt-events.cjs +0 -884
  509. package/detox/attempt-events.d.cts +0 -113
  510. package/detox/motion-change.cjs +0 -524
  511. package/detox/motion-change.d.cts +0 -140
  512. package/detox/motion-leg-starts.cjs +0 -20
  513. package/detox/motion-leg-starts.d.cts +0 -8
  514. package/detox/proof-frame.cjs +0 -190
  515. package/detox/record-block-execution.cjs +0 -78
@@ -20,6 +20,12 @@ export interface SwiftResourceBundle {
20
20
  export interface SwiftObjCPeerClass {
21
21
  name: string
22
22
  header: string
23
+ /**
24
+ * a framework-private class no public header declares, measured on native:
25
+ * its superclass is a header class in the same list and `swift` names the
26
+ * exact Swift metatype that stands for it, which the importer cannot expose.
27
+ */
28
+ private?: { superclass: string; swift: string }
23
29
  }
24
30
 
25
31
  /** generated registration source whose call must precede the application entry. */
@@ -54,6 +60,15 @@ export interface SwiftProjectPreparation {
54
60
  objcImplementations?: SwiftObjCImplementationPlan
55
61
  }
56
62
 
63
+ /**
64
+ * one header map xcode generates for a target. a value is a header, written as
65
+ * a path under SWIFT_NATIVE_INPUT_ROOT, or a framework include `Product/Header.h`.
66
+ */
67
+ export interface SwiftNativeHeaderMap {
68
+ flag: '-I' | '-iquote'
69
+ entries: [string, string][]
70
+ }
71
+
57
72
  /** project-relative original clang inputs; no host paths cross the compile boundary. */
58
73
  export interface SwiftNativeTarget {
59
74
  name: string
@@ -63,7 +78,13 @@ export interface SwiftNativeTarget {
63
78
  bridgingHeader: string | null
64
79
  prefixHeader: string | null
65
80
  headerSearchPaths: string[]
81
+ /** USER_HEADER_SEARCH_PATHS, which xcode searches as `-iquote` after the project map. */
82
+ userHeaderSearchPaths: string[]
66
83
  frameworkSearchPaths: string[]
84
+ /** the own-target and project header maps, in xcode's search order. */
85
+ headerMaps: SwiftNativeHeaderMap[]
86
+ /** the product header overlay: each framework product path and the original file it names. */
87
+ productHeaders: Record<string, string>
67
88
  flags: string[]
68
89
  cxxFlags: string[]
69
90
  fileFlags: Record<string, string[]>
@@ -87,7 +108,14 @@ export function isSwiftNativeTargets(value: unknown): value is SwiftNativeTarget
87
108
  const perFile = field('fileFlags')
88
109
  const directories = field('sourceDirectories')
89
110
  const searches = field('headerSearchPaths')
111
+ const userSearches = field('userHeaderSearchPaths')
90
112
  const frameworks = field('frameworkSearchPaths')
113
+ const maps = field('headerMaps')
114
+ const products = field('productHeaders')
115
+ const inputPath = (value: unknown) =>
116
+ typeof value === 'string' &&
117
+ value.startsWith(`${SWIFT_NATIVE_INPUT_ROOT}/`) &&
118
+ isSwiftResourcePath(value.slice(SWIFT_NATIVE_INPUT_ROOT.length + 1))
91
119
  const deployment = field('deploymentTarget')
92
120
  return (
93
121
  typeof field('name') === 'string' &&
@@ -100,8 +128,34 @@ export function isSwiftNativeTargets(value: unknown): value is SwiftNativeTarget
100
128
  nullablePath('prefixHeader') &&
101
129
  strings(searches) &&
102
130
  searches.every((item) => item === '.' || isSwiftResourcePath(item)) &&
131
+ strings(userSearches) &&
132
+ userSearches.every((item) => item === '.' || isSwiftResourcePath(item)) &&
103
133
  strings(frameworks) &&
104
134
  frameworks.every((item) => item === '.' || isSwiftResourcePath(item)) &&
135
+ Array.isArray(maps) &&
136
+ maps.every((map: unknown) => {
137
+ if (!map || typeof map !== 'object') return false
138
+ const flag: unknown = Reflect.get(map, 'flag')
139
+ const entries: unknown = Reflect.get(map, 'entries')
140
+ return (
141
+ (flag === '-I' || flag === '-iquote') &&
142
+ Array.isArray(entries) &&
143
+ entries.every(
144
+ (entry: unknown) =>
145
+ Array.isArray(entry) &&
146
+ entry.length === 2 &&
147
+ typeof entry[0] === 'string' &&
148
+ !entry[0].includes('\0') &&
149
+ (inputPath(entry[1]) || isSwiftResourcePath(entry[1])),
150
+ )
151
+ )
152
+ }) &&
153
+ !!products &&
154
+ typeof products === 'object' &&
155
+ !Array.isArray(products) &&
156
+ Object.entries(products).every(
157
+ ([product, file]) => isSwiftResourcePath(product) && isSwiftResourcePath(file),
158
+ ) &&
105
159
  strings(field('flags')) &&
106
160
  strings(field('cxxFlags')) &&
107
161
  !!perFile &&
@@ -39,6 +39,7 @@ import {
39
39
  SOOTSIM_RUNTIME_MISSING_MESSAGE,
40
40
  } from './runtime-assets'
41
41
  import { SWIFT_HMR_PATH, SWIFT_PACKAGE_PATH } from './swift-submit'
42
+ import { swiftViteLifetime } from './swift-vite-lifetime'
42
43
  import type { OneWidgetPackage } from './oneWidgetContract'
43
44
  import type { PeachPluginOptions } from './vite'
44
45
  import type { IncomingMessage, ServerResponse } from 'node:http'
@@ -70,6 +71,7 @@ const loadKotlinHost = () => (kotlinHost ??= import('peachsim/kotlin-host'))
70
71
 
71
72
  export function peachPlugin(options: PeachPluginOptions = {}): Plugin {
72
73
  const prefix = options.prefix || '/__peachsim'
74
+ let closeSwiftHost: (() => Promise<void>) | undefined
73
75
 
74
76
  return {
75
77
  name: 'sootsim-one',
@@ -106,8 +108,15 @@ export function peachPlugin(options: PeachPluginOptions = {}): Plugin {
106
108
  return { optimizeDeps: { include: ['use-latest-callback'] } }
107
109
  },
108
110
 
111
+ async closeBundle() {
112
+ await closeSwiftHost?.()
113
+ },
114
+
109
115
  async configureServer(server) {
110
116
  if (options.enabled === false) return
117
+ const lifetime = swiftViteLifetime(server)
118
+ const { signal, compiles: swiftCompiles, projects: swiftProjects } = lifetime
119
+ closeSwiftHost = () => lifetime.close()
111
120
  // a native bundle carries the install it was built from, as hosted
112
121
  // bundles do: any shell that launches it, including one that found this
113
122
  // server by scanning, learns the installed native package versions. a
@@ -231,21 +240,33 @@ export function peachPlugin(options: PeachPluginOptions = {}): Plugin {
231
240
  packageName: string,
232
241
  moduleRoot: string | undefined,
233
242
  ) => {
234
- const packagePath = await servedPackage(packageName)
235
- if (!packagePath) throw new Error(`swift package ${packageName} was not found`)
236
- const host = await loadSwiftHost()
237
- const metadata = await host.swiftPackageMetadata(
238
- packagePath,
239
- packageName,
240
- moduleRoot,
241
- devOrigin(),
242
- )
243
- return {
244
- ...metadata,
245
- hmrPath,
246
- ...(packageName === host.ONE_WIDGET_PACKAGE && widgetPackage
247
- ? { widget: widgetPackage.widget }
248
- : {}),
243
+ const pending = (async () => {
244
+ signal.throwIfAborted()
245
+ const packagePath = await servedPackage(packageName)
246
+ if (!packagePath) throw new Error(`swift package ${packageName} was not found`)
247
+ swiftProjects.add(packagePath)
248
+ const host = await loadSwiftHost()
249
+ const metadata = await host.swiftPackageMetadata(
250
+ packagePath,
251
+ packageName,
252
+ moduleRoot,
253
+ devOrigin(),
254
+ undefined,
255
+ signal,
256
+ )
257
+ return {
258
+ ...metadata,
259
+ hmrPath,
260
+ ...(packageName === host.ONE_WIDGET_PACKAGE && widgetPackage
261
+ ? { widget: widgetPackage.widget }
262
+ : {}),
263
+ }
264
+ })()
265
+ swiftCompiles.add(pending)
266
+ try {
267
+ return await pending
268
+ } finally {
269
+ swiftCompiles.delete(pending)
249
270
  }
250
271
  }
251
272
  const wsOptions = server.config.server.ws
@@ -18,12 +18,14 @@ import {
18
18
  type SwiftProject,
19
19
  } from './swift-host'
20
20
  import { swiftNativeEntry } from './swift-submit'
21
+ import { swiftViteLifetime } from './swift-vite-lifetime'
21
22
  import type { Plugin, ViteDevServer } from 'vite'
22
23
 
23
24
  export {
24
25
  buildSwiftBundleFiles,
25
26
  buildSwiftResourceTable,
26
27
  compileInput,
28
+ disposeSwiftProject,
27
29
  entryRootId,
28
30
  linkedModuleRoots,
29
31
  serveSwiftPackageAsset,
@@ -82,6 +84,7 @@ export interface SwiftPluginOptions {
82
84
  }
83
85
 
84
86
  export function swiftPlugin(options: SwiftPluginOptions = {}): Plugin {
87
+ let lifetime: ReturnType<typeof swiftViteLifetime> | undefined
85
88
  return {
86
89
  name: 'rnx-swift',
87
90
  enforce: 'pre',
@@ -118,13 +121,16 @@ export function swiftPlugin(options: SwiftPluginOptions = {}): Plugin {
118
121
 
119
122
  async load(id) {
120
123
  if (!id.startsWith(VIRTUAL_PREFIX)) return null
124
+ const owner = lifetime
125
+ owner?.signal.throwIfAborted()
121
126
  const file = id.slice(VIRTUAL_PREFIX.length)
122
127
  // the module is the whole package's artifact, so an import of a file
123
128
  // that was deleted would keep answering with it. a deleted .tsx fails
124
129
  // its importer; so does a deleted .swift.
125
130
  if (!fs.existsSync(file)) throw new Error(`swift source ${file} no longer exists`)
126
131
  const packagePath = options.packagePath ?? packageFor(file)
127
- const project = projectFor(packagePath)
132
+ const project = projectFor(packagePath, undefined, owner?.signal)
133
+ owner?.projects.add(project.packagePath)
128
134
  const entry = path.relative(packagePath, file).split(path.sep).join(path.posix.sep)
129
135
  // every source in the package is a dependency of this module, so a
130
136
  // bundler watching this module learns about a `.swift` edit and re-runs
@@ -148,17 +154,25 @@ export function swiftPlugin(options: SwiftPluginOptions = {}): Plugin {
148
154
  this.addWatchFile(path.join(moduleRoot, relative))
149
155
  let artifact: SwiftArtifact
150
156
  try {
151
- artifact = await artifactFor(project, entry)
157
+ const pending = artifactFor(project, entry)
158
+ owner?.compiles.add(pending)
159
+ try {
160
+ artifact = await pending
161
+ } finally {
162
+ owner?.compiles.delete(pending)
163
+ }
152
164
  } catch (error) {
153
165
  // a compile error must not fail this module. a module whose load threw
154
166
  // leaves the graph unwatched, so the edit that fixes the error would
155
167
  // never rebuild it and the app would sit on a stale frame until the
156
168
  // dev server restarted. the previous artifact keeps rendering, and the
157
169
  // error is reported here instead.
170
+ owner?.signal.throwIfAborted()
158
171
  if (!project.artifact) throw error
159
172
  this.warn(error instanceof Error ? error.message : String(error))
160
173
  artifact = project.artifact
161
174
  }
175
+ owner?.signal.throwIfAborted()
162
176
  const resources = resolveSwiftImageResourceUrls(
163
177
  artifact.package.resources.table,
164
178
  serverOrigin(),
@@ -190,8 +204,13 @@ export function swiftPlugin(options: SwiftPluginOptions = {}): Plugin {
190
204
  })
191
205
  },
192
206
 
207
+ async closeBundle() {
208
+ await lifetime?.close()
209
+ },
210
+
193
211
  configureServer(server) {
194
212
  devServer = server
213
+ lifetime = swiftViteLifetime(server)
195
214
 
196
215
  server.middlewares.use((req, res, next) => {
197
216
  if (!serveSwiftPackageAsset((req.url ?? '').split('?')[0], res)) next()
@@ -8,12 +8,12 @@ const require = createRequire(import.meta.url)
8
8
  const systemRuntime = fs.readFileSync(require.resolve('systemjs/dist/s.min.js'), 'utf8')
9
9
  const minifierModule = require.resolve('rolldown/utils')
10
10
  const rollupModule = require.resolve('rollup')
11
- type MinifiedWorkerChunk = { code: string; map: string; loweredCode?: string }
11
+ type MinifiedWorkerChunk = { code: string; map: string }
12
12
  const minifierWorker = `
13
13
  const { parentPort, workerData } = require('node:worker_threads');
14
14
  const minifier = import(workerData.module);
15
15
  const lowering = import(workerData.rollup);
16
- parentPort.on('message', async ({ code, isEntry, keepNames, measurement, inputMap, entryImports, captureStages }) => {
16
+ parentPort.on('message', async ({ code, isEntry, keepNames, measurement, inputMap, entryImports }) => {
17
17
  try {
18
18
  const { rollup } = await lowering;
19
19
  const entry = 'peach-worker-chunk.js';
@@ -55,7 +55,7 @@ parentPort.on('message', async ({ code, isEntry, keepNames, measurement, inputMa
55
55
  inputMap: JSON.parse(loweredMap),
56
56
  });
57
57
  if (result.errors.length) throw new Error(result.errors.map(error => error.message).join('; '));
58
- parentPort.postMessage({ code: result.code, map: result.map && JSON.stringify(result.map), ...(captureStages ? { loweredCode } : {}) });
58
+ parentPort.postMessage({ code: result.code, map: result.map && JSON.stringify(result.map) });
59
59
  } catch (error) {
60
60
  parentPort.postMessage({ error: error instanceof Error ? error.message : String(error) });
61
61
  }
@@ -67,7 +67,6 @@ type MinifierJob = {
67
67
  keepNames: boolean
68
68
  inputMap: string | undefined
69
69
  entryImports: readonly string[]
70
- captureStages: boolean
71
70
  resolve: (result: MinifiedWorkerChunk) => void
72
71
  reject: (error: Error) => void
73
72
  }
@@ -123,9 +122,6 @@ function runMinifiers() {
123
122
  result = {
124
123
  code: message.code,
125
124
  map: message.map,
126
- ...(job?.captureStages && typeof message.loweredCode === 'string'
127
- ? { loweredCode: message.loweredCode }
128
- : {}),
129
125
  }
130
126
  } else {
131
127
  created.failure = new Error(
@@ -174,7 +170,6 @@ function runMinifiers() {
174
170
  keepNames: job.keepNames,
175
171
  inputMap: job.inputMap,
176
172
  entryImports: job.entryImports,
177
- captureStages: job.captureStages,
178
173
  measurement: process.env.PEACH_ENGINE_PROFILE === '1',
179
174
  })
180
175
  } catch (error) {
@@ -302,7 +297,6 @@ export function renderWorkerSystemChunk(
302
297
  keepNames = false,
303
298
  inputMap?: string,
304
299
  entryImports: readonly string[] = [],
305
- captureStages = false,
306
300
  ) {
307
301
  return new Promise<MinifiedWorkerChunk>((resolve, reject) => {
308
302
  pendingMinifiers.push({
@@ -311,7 +305,6 @@ export function renderWorkerSystemChunk(
311
305
  keepNames,
312
306
  inputMap,
313
307
  entryImports,
314
- captureStages,
315
308
  resolve,
316
309
  reject,
317
310
  })
@@ -0,0 +1,114 @@
1
+ // xcode's generated header search inputs, written once for every compile that
2
+ // consumes them: each target's header maps and the project's product header
3
+ // overlay, in the order xcode passes them to clang.
4
+
5
+ import fs from 'node:fs'
6
+ import path from 'node:path'
7
+ import type { SwiftNativeHeaderMap } from './swiftContract'
8
+
9
+ // clang's header map format: case-insensitive keys hashed into a power-of-two
10
+ // bucket table, each value split into a prefix and suffix string.
11
+ function headerMap(entries: readonly (readonly [string, string])[]): Buffer {
12
+ const unique = new Map<string, readonly [string, string]>()
13
+ for (const entry of entries)
14
+ if (!unique.has(entry[0].toLowerCase())) unique.set(entry[0].toLowerCase(), entry)
15
+ let buckets = 8
16
+ while (buckets < unique.size * 2) buckets *= 2
17
+ const strings: Buffer[] = [Buffer.alloc(1)]
18
+ let length = 1
19
+ const offsets = new Map<string, number>()
20
+ const offset = (text: string): number => {
21
+ const known = offsets.get(text)
22
+ if (known !== undefined) return known
23
+ const at = length
24
+ const bytes = Buffer.from(`${text}\0`)
25
+ offsets.set(text, at)
26
+ strings.push(bytes)
27
+ length += bytes.length
28
+ return at
29
+ }
30
+ const table = Buffer.alloc(24 + buckets * 12)
31
+ let longest = 0
32
+ for (const [lower, [key, value]] of unique) {
33
+ let bucket = 0
34
+ for (const character of Buffer.from(lower)) bucket = (bucket + character * 13) >>> 0
35
+ bucket &= buckets - 1
36
+ while (table.readUInt32LE(24 + bucket * 12) !== 0)
37
+ bucket = (bucket + 1) & (buckets - 1)
38
+ const split = value.lastIndexOf('/') + 1
39
+ table.writeUInt32LE(offset(key), 24 + bucket * 12)
40
+ table.writeUInt32LE(offset(value.slice(0, split)), 28 + bucket * 12)
41
+ table.writeUInt32LE(offset(value.slice(split)), 32 + bucket * 12)
42
+ longest = Math.max(longest, Buffer.byteLength(value))
43
+ }
44
+ table.writeUInt32LE(0x686d6170, 0)
45
+ table.writeUInt16LE(1, 4)
46
+ table.writeUInt32LE(table.length, 8)
47
+ table.writeUInt32LE(unique.size, 12)
48
+ table.writeUInt32LE(buckets, 16)
49
+ table.writeUInt32LE(longest, 20)
50
+ return Buffer.concat([table, ...strings])
51
+ }
52
+
53
+ /**
54
+ * writes the overlay and maps into `directory` and returns each target's
55
+ * flags: `-I` maps, the overlay, `-iquote` maps, then user header search
56
+ * paths as `-iquote`. every path is already where the compile reads it; a map
57
+ * value that is not absolute is a framework include and stays as written.
58
+ */
59
+ export function writeXcodeHeaderSearch(
60
+ directory: string,
61
+ targets: readonly {
62
+ headerMaps: readonly SwiftNativeHeaderMap[]
63
+ productHeaders: Readonly<Record<string, string>>
64
+ userHeaderSearchPaths: readonly string[]
65
+ }[],
66
+ ): { files: string[]; flags: string[][] } {
67
+ fs.mkdirSync(directory, { recursive: true })
68
+ // each framework directory lists the original headers and module map it
69
+ // publishes, so a header reached by its framework path and by its own path
70
+ // is one file.
71
+ const productDirectories = new Map<string, { name: string; file: string }[]>()
72
+ for (const target of targets)
73
+ for (const [product, file] of Object.entries(target.productHeaders)) {
74
+ const listed = productDirectories.get(path.dirname(product)) ?? []
75
+ productDirectories.set(path.dirname(product), listed)
76
+ listed.push({ name: path.basename(product), file })
77
+ }
78
+ const overlay = path.join(directory, 'all-product-headers.yaml')
79
+ fs.writeFileSync(
80
+ overlay,
81
+ JSON.stringify({
82
+ 'case-sensitive': 'false',
83
+ roots: [...productDirectories].map(([name, files]) => ({
84
+ contents: files.map((entry) => ({
85
+ 'external-contents': entry.file,
86
+ name: entry.name,
87
+ type: 'file',
88
+ })),
89
+ name,
90
+ type: 'directory',
91
+ })),
92
+ version: 0,
93
+ }),
94
+ )
95
+ const files = [overlay]
96
+ const flags = targets.map((target, index) => {
97
+ const maps = target.headerMaps.map((map, order) => {
98
+ const file = path.join(directory, `${index}-${order}.hmap`)
99
+ fs.writeFileSync(file, headerMap(map.entries))
100
+ files.push(file)
101
+ return { flag: map.flag, file }
102
+ })
103
+ return [
104
+ ...maps.filter((map) => map.flag === '-I').flatMap((map) => [map.flag, map.file]),
105
+ '-ivfsoverlay',
106
+ overlay,
107
+ ...maps
108
+ .filter((map) => map.flag === '-iquote')
109
+ .flatMap((map) => [map.flag, map.file]),
110
+ ...target.userHeaderSearchPaths.flatMap((directory) => ['-iquote', directory]),
111
+ ]
112
+ })
113
+ return { files, flags }
114
+ }
@@ -15,6 +15,7 @@ import plist from 'plist'
15
15
  import { readXcodeJsonProject } from './xcode-json-project'
16
16
  import { visitXcodeTargetMembers, xcodePathResolver } from './xcode-target-members'
17
17
  import type { SwiftLinkedProduct } from './swift-packages'
18
+ import type { SwiftNativeHeaderMap } from './swiftContract'
18
19
 
19
20
  export {
20
21
  parseOpenStepPlist,
@@ -57,6 +58,8 @@ export interface XcodeModuleTarget {
57
58
  prefixHeader: string | null
58
59
  bridgingHeader: string | null
59
60
  headerSearchPaths: string[]
61
+ /** USER_HEADER_SEARCH_PATHS, which xcode searches as `-iquote` after the project map. */
62
+ userHeaderSearchPaths: string[]
60
63
  frameworkSearchPaths: string[]
61
64
  flags: string[]
62
65
  cxxFlags: string[]
@@ -66,7 +69,7 @@ export interface XcodeModuleTarget {
66
69
  * own-target map as `-I`, then the project map as `-iquote`. a value is
67
70
  * an absolute header or a framework include `Product/Header.h`.
68
71
  */
69
- headerMaps: { flag: '-I' | '-iquote'; entries: [string, string][] }[]
72
+ headerMaps: SwiftNativeHeaderMap[]
70
73
  /** what xcode publishes in the target's framework product: product path to original file. */
71
74
  productHeaders: Record<string, string>
72
75
  }
@@ -332,7 +335,7 @@ interface LoadedProject {
332
335
  resolvePath: (id: string) => string | null
333
336
  }
334
337
 
335
- const loaded = new Map<string, { mtimeMs: number; project: LoadedProject }>()
338
+ const loaded = new Map<string, { digest: string; project: LoadedProject }>()
336
339
 
337
340
  // a project bundle holds one project file, in either format.
338
341
  function xcodeProjectFile(xcodeproj: string): string | null {
@@ -347,10 +350,10 @@ function loadProject(xcodeproj: string): LoadedProject {
347
350
  const projectFile = xcodeProjectFile(xcodeproj)
348
351
  if (!projectFile)
349
352
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`)
350
- const mtimeMs = fs.statSync(projectFile).mtimeMs
351
- const cached = loaded.get(projectFile)
352
- if (cached?.mtimeMs === mtimeMs) return cached.project
353
353
  const source = fs.readFileSync(projectFile, 'utf8')
354
+ const digest = createHash('sha256').update(source).digest('hex')
355
+ const cached = loaded.get(projectFile)
356
+ if (cached?.digest === digest) return cached.project
354
357
  const root = projectFile.endsWith('.xcproj')
355
358
  ? readXcodeJsonProject(xcodeproj, source)
356
359
  : parseOpenStepPlist(source)
@@ -380,7 +383,7 @@ function loadProject(xcodeproj: string): LoadedProject {
380
383
  object,
381
384
  resolvePath,
382
385
  }
383
- loaded.set(projectFile, { mtimeMs, project: result })
386
+ loaded.set(projectFile, { digest, project: result })
384
387
  return result
385
388
  }
386
389
 
@@ -1276,14 +1279,91 @@ export function readXcodeAppTarget(
1276
1279
  )
1277
1280
  for (const file of read) xcconfigs.add(file)
1278
1281
  const swiftVersion = Number.parseFloat(settings('SWIFT_VERSION') || '5')
1279
- const { headers, ...members } = targetMembers(ref, settings, options, keys, xcconfigs)
1280
- const searchRules = recursiveSearchRules(settings)
1281
- const implementations = members.allSources.filter((file) =>
1282
- /\.(c|cc|cpp|cxx|m|mm)$/.test(file),
1282
+ const { headers, allSources, ...members } = targetMembers(
1283
+ ref,
1284
+ settings,
1285
+ options,
1286
+ keys,
1287
+ xcconfigs,
1283
1288
  )
1289
+ const searchRules = recursiveSearchRules(settings)
1284
1290
  const absolute = (file: string) => path.resolve(ref.project.projectDir, file)
1285
1291
  const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? '')
1286
1292
  const product = settings('PRODUCT_NAME')
1293
+ const building = options.prepareGeneratedSources && options.requireSources !== false
1294
+ // apple-generic versioning compiles one more unit xcode writes into
1295
+ // DERIVED_FILE_DIR, defining the product's version string and number, for
1296
+ // every target that compiles sources, swift-only ones included.
1297
+ const versioning =
1298
+ building &&
1299
+ allSources.length > 0 &&
1300
+ settings('VERSIONING_SYSTEM') === 'apple-generic'
1301
+ ? path.join(settings('DERIVED_FILE_DIR'), `${product}_vers.c`)
1302
+ : null
1303
+ if (versioning) {
1304
+ const version = settings('CURRENT_PROJECT_VERSION')
1305
+ const custom = [
1306
+ 'VERSION_INFO_FILE',
1307
+ 'VERSION_INFO_STRING',
1308
+ 'VERSION_INFO_BUILDER',
1309
+ 'VERSION_INFO_EXPORT_DECL',
1310
+ 'VERSION_INFO_PREFIX',
1311
+ 'VERSION_INFO_SUFFIX',
1312
+ ].filter((key) => settings(key))
1313
+ if (!/^\d+$/.test(version) || !/^[A-Za-z_]\w*$/.test(product) || custom.length)
1314
+ throw new Error(
1315
+ `${name}: Xcode generates ${path.basename(versioning)} for VERSIONING_SYSTEM=apple-generic; peach writes it only for an integer CURRENT_PROJECT_VERSION (${JSON.stringify(version)}), an identifier PRODUCT_NAME (${JSON.stringify(product)}) and no ${custom.length ? custom.join(', ') : 'VERSION_INFO_* override'}`,
1316
+ )
1317
+ const unit = [
1318
+ ` extern const unsigned char ${product}VersionString[];`,
1319
+ ` extern const double ${product}VersionNumber;`,
1320
+ '',
1321
+ ` const unsigned char ${product}VersionString[] __attribute__ ((used)) = "@(#)PROGRAM:${product} PROJECT:${settings('PROJECT_NAME')}-${version}" "\\n";`,
1322
+ ` const double ${product}VersionNumber __attribute__ ((used)) = (double)${version}.;`,
1323
+ '',
1324
+ ].join('\n')
1325
+ if (!fs.existsSync(versioning) || fs.readFileSync(versioning, 'utf8') !== unit) {
1326
+ fs.mkdirSync(path.dirname(versioning), { recursive: true })
1327
+ fs.writeFileSync(versioning, unit)
1328
+ }
1329
+ allSources.push(versioning)
1330
+ }
1331
+ // any c-family unit, the versioning unit included, takes the objective-c
1332
+ // implementation route.
1333
+ const implementations = allSources.filter((file) =>
1334
+ /\.(c|cc|cpp|cxx|m|mm)$/.test(file),
1335
+ )
1336
+ const native = implementations.length > 0
1337
+ // the header search xcode generates that peach does not model refuses
1338
+ // here, before any unit compiles without it.
1339
+ if (native && building) {
1340
+ const generatedHeaders = list(ref.target.buildPhases).flatMap((phaseId) => {
1341
+ const phase = ref.project.object(phaseId)
1342
+ return phase?.isa === 'PBXShellScriptBuildPhase'
1343
+ ? list(phase.outputPaths).filter((output) => HEADER_FILE.test(output))
1344
+ : []
1345
+ })
1346
+ if (generatedHeaders.length > 0 || list(ref.target.buildRules).length > 0)
1347
+ throw new Error(
1348
+ `${name}: Xcode's generated-files header map, which lists headers its build rules and Run Script phases generate (${generatedHeaders.join(', ') || 'build rules'}), is not modeled`,
1349
+ )
1350
+ const nonFramework = nativeTargets(ref.project).find(
1351
+ (other) =>
1352
+ !FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? '') &&
1353
+ headerPhase(other).length > 0,
1354
+ )
1355
+ if (nonFramework && settings('USE_HEADERMAP') !== 'NO')
1356
+ throw new Error(
1357
+ `${name}: Xcode's all-non-framework-target-headers map, which lists the headers of ${str(nonFramework.target.name) ?? nonFramework.id}, is not modeled`,
1358
+ )
1359
+ if (
1360
+ settings('ALWAYS_SEARCH_USER_PATHS') === 'YES' &&
1361
+ settings('USER_HEADER_SEARCH_PATHS').trim()
1362
+ )
1363
+ throw new Error(
1364
+ `${name}: ALWAYS_SEARCH_USER_PATHS=YES also searches USER_HEADER_SEARCH_PATHS for angle-bracket includes, which is not modeled`,
1365
+ )
1366
+ }
1287
1367
  const headerFiles = headerPhase(ref)
1288
1368
  // the own-target map: a published header by its framework include, a
1289
1369
  // project header by its path under both its name and the framework's.
@@ -1325,11 +1405,12 @@ export function readXcodeAppTarget(
1325
1405
  name,
1326
1406
  moduleName: applyOperator(settings('PRODUCT_MODULE_NAME'), 'c99extidentifier'),
1327
1407
  ...members,
1408
+ allSources,
1328
1409
  languageMode: swiftVersion >= 6 ? 6 : 5,
1329
1410
  mainActorIsolation: settings('SWIFT_DEFAULT_ACTOR_ISOLATION') === 'MainActor',
1330
1411
  defines: compilationConditions(settings),
1331
1412
  iosDeploymentTarget: settings('IPHONEOS_DEPLOYMENT_TARGET') || null,
1332
- ...(implementations.some((file) => /\.mm?$/.test(file))
1413
+ ...(native
1333
1414
  ? {
1334
1415
  objc: {
1335
1416
  publicHeaders: headerFiles.flatMap(({ file, visibility }) =>
@@ -1352,10 +1433,23 @@ export function readXcodeAppTarget(
1352
1433
  bridgingHeader: settings('SWIFT_OBJC_BRIDGING_HEADER')
1353
1434
  ? absolute(settings('SWIFT_OBJC_BRIDGING_HEADER'))
1354
1435
  : null,
1436
+ // xcode searches its products' include directory before
1437
+ // HEADER_SEARCH_PATHS and the target's derived sources after.
1355
1438
  headerSearchPaths: [
1356
- ...settingList(settings('HEADER_SEARCH_PATHS')),
1357
- ...settingList(settings('USER_HEADER_SEARCH_PATHS')),
1358
- ].flatMap((raw) => expandSearchPath(absolute(raw), searchRules)),
1439
+ path.join(settings('BUILT_PRODUCTS_DIR'), 'include'),
1440
+ ...settingList(settings('HEADER_SEARCH_PATHS')).flatMap((raw) =>
1441
+ expandSearchPath(absolute(raw), searchRules),
1442
+ ),
1443
+ path.join(
1444
+ `${settings('DERIVED_FILE_DIR')}-normal`,
1445
+ settings('CURRENT_ARCH'),
1446
+ ),
1447
+ path.join(settings('DERIVED_FILE_DIR'), settings('CURRENT_ARCH')),
1448
+ settings('DERIVED_FILE_DIR'),
1449
+ ],
1450
+ userHeaderSearchPaths: settingList(
1451
+ settings('USER_HEADER_SEARCH_PATHS'),
1452
+ ).flatMap((raw) => expandSearchPath(absolute(raw), searchRules)),
1359
1453
  // xcode searches the target's own products directory first
1360
1454
  frameworkSearchPaths: [
1361
1455
  settings('BUILT_PRODUCTS_DIR'),