peachsim 0.1.1808 → 0.1.1811

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 (229) hide show
  1. package/README.md +4 -2
  2. package/cli/app-bundle-resources.ts +15 -2
  3. package/cli/cloud-box-artifact.ts +115 -0
  4. package/cli/cloud-client.ts +95 -53
  5. package/cli/cloud-dispatch.ts +4 -4
  6. package/cli/cloud-session.ts +60 -22
  7. package/cli/commands/box.ts +8 -2
  8. package/cli/commands/compat.ts +7 -4
  9. package/cli/commands/control.ts +60 -3
  10. package/cli/commands/coverage.ts +14 -4
  11. package/cli/commands/daemon.ts +41 -0
  12. package/cli/commands/no-bridge-hint.ts +9 -0
  13. package/cli/commands/package.ts +31 -56
  14. package/cli/commands/platform.ts +70 -52
  15. package/cli/commands/preview.ts +73 -24
  16. package/cli/commands/record.ts +10 -2
  17. package/cli/commands/screenshot.ts +17 -60
  18. package/cli/commands/setup.ts +3 -1
  19. package/cli/commands/three-mode.ts +22 -12
  20. package/cli/commands/upload.ts +2 -1
  21. package/cli/desktop-companion.ts +6 -1
  22. package/cli/drivers/desktop.ts +4 -1
  23. package/cli/main.ts +12 -2
  24. package/cli/metro-bundle-assets.ts +14 -4
  25. package/cli/outbound-endpoints.ts +7 -3
  26. package/cli/output-redaction.ts +38 -0
  27. package/cli/privacy.ts +2 -2
  28. package/cli/recording-access.ts +5 -0
  29. package/cli/remote-project-bundle.ts +83 -0
  30. package/cli/shell-init.ts +7 -11
  31. package/cli/telemetry.ts +41 -4
  32. package/cli/usage-error.ts +3 -0
  33. package/cli/ws-bridge.ts +42 -6
  34. package/dist-lib/agent-daemon-client.cjs +1 -1
  35. package/dist-lib/agent-events.cjs +1 -1
  36. package/dist-lib/attached-projects.cjs +1 -1
  37. package/dist-lib/auth/shared-session.cjs +1 -1
  38. package/dist-lib/backend-origin.cjs +1 -1
  39. package/dist-lib/beta.cjs +1 -1
  40. package/dist-lib/beta.mjs +1 -1
  41. package/dist-lib/bridge-constants.cjs +1 -1
  42. package/dist-lib/bridge-contract-input.cjs +1 -1
  43. package/dist-lib/bridge-contract-input.mjs +1 -1
  44. package/dist-lib/bridge-contract.cjs +1 -1
  45. package/dist-lib/bridge-contract.mjs +1 -1
  46. package/dist-lib/bundle-channel.cjs +42783 -40717
  47. package/dist-lib/capture-contract.cjs +7 -8
  48. package/dist-lib/capture-contract.mjs +7 -8
  49. package/dist-lib/cloud-contract.cjs +1 -1
  50. package/dist-lib/cloud-contract.mjs +1 -1
  51. package/dist-lib/cloud-test-args.cjs +1 -1
  52. package/dist-lib/cloud-test-args.mjs +1 -1
  53. package/dist-lib/cloud.cjs +1 -1
  54. package/dist-lib/cloud.mjs +1 -1
  55. package/dist-lib/config.cjs +1 -1
  56. package/dist-lib/config.mjs +1 -1
  57. package/dist-lib/detox/index.cjs +13 -7
  58. package/dist-lib/dev-bundle-resolution.cjs +10 -4
  59. package/dist-lib/expo-swift-bundle.cjs +15819 -15559
  60. package/dist-lib/expo-swift-metadata.cjs +2 -1
  61. package/dist-lib/expo-swift-metadata.mjs +2 -1
  62. package/dist-lib/home-paths.cjs +2 -33
  63. package/dist-lib/host/bridge-host.cjs +20857 -18756
  64. package/dist-lib/host/fetch-proxy-handler.cjs +10 -10
  65. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  66. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  67. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  68. package/dist-lib/host/websocket-proxy.cjs +1 -1
  69. package/dist-lib/index.cjs +588 -544
  70. package/dist-lib/jump-to-source-babel.cjs +1 -1
  71. package/dist-lib/jump-to-source-native.cjs +1 -1
  72. package/dist-lib/kotlin-host.cjs +1 -1
  73. package/dist-lib/menu.cjs +1 -1
  74. package/dist-lib/menu.mjs +1 -1
  75. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  76. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  77. package/dist-lib/metro-production-bundle.cjs +1 -1
  78. package/dist-lib/metro-production-bundle.mjs +1 -1
  79. package/dist-lib/metro.cjs +25 -19
  80. package/dist-lib/native-app-identity-project.cjs +15 -6
  81. package/dist-lib/native-app-identity-project.mjs +23 -12
  82. package/dist-lib/native-app-identity.cjs +1 -1
  83. package/dist-lib/native-app-identity.mjs +1 -1
  84. package/dist-lib/native-firebase-metadata.cjs +1 -1
  85. package/dist-lib/native-firebase-metadata.mjs +1 -1
  86. package/dist-lib/pdfium-raster.cjs +1 -1
  87. package/dist-lib/pdfium-raster.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 +1 -1
  91. package/dist-lib/public-brand.cjs +1 -1
  92. package/dist-lib/public-origins-lib-esm.json +27 -26
  93. package/dist-lib/public-origins-lib.json +104 -81
  94. package/dist-lib/react-native-host-modules.cjs +1 -1
  95. package/dist-lib/react-native-host-modules.mjs +1 -1
  96. package/dist-lib/reap-browser.cjs +1 -1
  97. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  98. package/dist-lib/sdk.cjs +1 -1
  99. package/dist-lib/sdk.mjs +1 -1
  100. package/dist-lib/skills.cjs +30496 -24309
  101. package/dist-lib/swift-compile.cjs +292 -213
  102. package/dist-lib/swift-compile.mjs +334 -254
  103. package/dist-lib/swift-package.cjs +8 -4
  104. package/dist-lib/swift-package.mjs +8 -4
  105. package/dist-lib/swift-submit.cjs +1 -1
  106. package/dist-lib/swift-submit.mjs +1 -1
  107. package/dist-lib/swift-toolchain.cjs +32 -1
  108. package/dist-lib/swift.cjs +1 -1
  109. package/dist-lib/vite-swift.cjs +19172 -18941
  110. package/dist-lib/vite.cjs +11 -11
  111. package/dist-lib/worklet-executable.cjs +1 -1
  112. package/dist-lib/worklet-executable.mjs +1 -1
  113. package/dist-types/packages/peach-engine/src/engine/animated.d.ts +4 -0
  114. package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +1 -0
  115. package/dist-types/packages/peach-engine/src/engine/expo-manifest.d.ts +1 -0
  116. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -1
  117. package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +1 -0
  118. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +8 -1
  119. package/dist-types/packages/peach-globals/src/electronBridgeContract.d.ts +2 -1
  120. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  121. package/kotlin/sdk.tar.gz +0 -0
  122. package/package.json +1 -1
  123. package/runtime-companion.json +1 -1
  124. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCall.h +1 -1
  125. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCallCenter.h +1 -1
  126. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h +1 -1
  127. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriber.h +1 -1
  128. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriberInfo.h +1 -1
  129. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h +1 -1
  130. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h +1 -1
  131. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSExtensionItem.h +1 -1
  132. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/AVFoundation+MPNowPlayingInfoLanguageOptionAdditions.h +39 -0
  133. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/AVPlayerItem+MediaPlayerAdditions.h +26 -0
  134. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPContentItem.h +67 -0
  135. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPError.h +33 -0
  136. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaEntity.h +53 -0
  137. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaItem.h +346 -0
  138. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaItemCollection.h +42 -0
  139. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaLibrary.h +76 -0
  140. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPickerController.h +64 -0
  141. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPlayback.h +47 -0
  142. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPlaylist.h +82 -0
  143. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaQuery.h +120 -0
  144. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaQuerySection.h +26 -0
  145. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerController.h +444 -0
  146. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerViewController.h +43 -0
  147. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerApplicationController.h +47 -0
  148. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerController.h +147 -0
  149. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerQueueDescriptor.h +75 -0
  150. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h +197 -0
  151. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoLanguageOption.h +107 -0
  152. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingSession.h +89 -0
  153. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentDataSource.h +59 -0
  154. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentDelegate.h +64 -0
  155. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentManager.h +46 -0
  156. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentManagerContext.h +32 -0
  157. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommand.h +143 -0
  158. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommandCenter.h +66 -0
  159. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommandEvent.h +128 -0
  160. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteControlTypes.h +27 -0
  161. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPVolumeSettings.h +20 -0
  162. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPVolumeView.h +82 -0
  163. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayer.apinotes +74 -0
  164. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayer.h +40 -0
  165. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayerDefines.h +84 -0
  166. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/NSUserActivity+MediaPlayerAdditions.h +20 -0
  167. package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Modules/module.modulemap +5 -0
  168. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityCustomRotor.h +2 -2
  169. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAction.h +1 -1
  170. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBackgroundConfiguration.h +1 -1
  171. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIButtonConfiguration.h +1 -1
  172. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIContextMenuConfiguration.h +1 -1
  173. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIContextMenuInteraction.h +1 -1
  174. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDeferredMenuElement.h +1 -1
  175. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenu.h +1 -1
  176. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPointerStyle.h +5 -5
  177. package/sdk/ios/usr/include/dispatch.modulemap +22 -0
  178. package/sdk/ios/usr/include/net/if.h +24 -0
  179. package/sdk/ios/usr/include/sys/time.h +1 -1
  180. package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +265 -0
  181. package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
  182. package/sdk/ios/wasm/include/fcntl.h +2 -0
  183. package/sdk/ios/wasm/include/pthread.h +3 -0
  184. package/sdk/ios/wasm/include/stdlib.h +2 -0
  185. package/sdk/ios/wasm/include/unistd.h +2 -2
  186. package/skills/contrast/SKILL.md +2 -2
  187. package/src/bundle-channel.mjs +9 -72
  188. package/src/capture-contract.ts +12 -9
  189. package/src/desktop-host-delivery.ts +16 -2
  190. package/src/dev-bundle-resolution.ts +12 -3
  191. package/src/expo-native-workspace.ts +57 -19
  192. package/src/expo-swift-host.ts +17 -12
  193. package/src/expo-swift-ready.ts +4 -1
  194. package/src/expoSwiftContract.ts +1 -0
  195. package/src/home-paths.ts +4 -48
  196. package/src/host/bridge-host.ts +1 -0
  197. package/src/installed-native-libraries.ts +2 -8
  198. package/src/metro-project-root.ts +2 -1
  199. package/src/native-bundles.ts +122 -0
  200. package/src/native-static-libraries.ts +65 -8
  201. package/src/nitro-adapter.lock.json +278 -278
  202. package/src/nitro-bundle.ts +2 -2
  203. package/src/nitro-compile.ts +68 -28
  204. package/src/nitro-source.ts +24 -6
  205. package/src/nitro-superset.lock.json +94 -34
  206. package/src/nitroContract.ts +2 -0
  207. package/src/podspec-sources.ts +1966 -0
  208. package/src/storageSnapshotContract.ts +40 -0
  209. package/src/swift-compile.ts +57 -20
  210. package/src/swift-design-time.ts +18 -1
  211. package/src/swift-distribution.lock.json +11 -11
  212. package/src/swift-distribution.ts +9 -6
  213. package/src/swift-host.ts +1 -2
  214. package/src/swift-objc-standin.ts +316 -112
  215. package/src/swift-package-manifest.ts +4 -3
  216. package/src/swift-package.ts +10 -3
  217. package/src/swift-root-lock.ts +11 -0
  218. package/src/swift-shared-sdk.ts +10 -9
  219. package/src/swift-source-pods.ts +2 -2
  220. package/src/swift-standins.ts +40 -143
  221. package/src/swift-toolchain.ts +42 -0
  222. package/src/swift-wasm-prune.ts +53 -21
  223. package/src/turbo-bundle.ts +2 -2
  224. package/src/turbo-codegen-intake.ts +111 -108
  225. package/src/turbo-compile.ts +63 -33
  226. package/src/turbo-runtime.lock.json +21 -21
  227. package/src/turbo-source.ts +171 -76
  228. package/src/wasm-optimize.ts +31 -2
  229. package/src/xcode-project.ts +36 -3
@@ -49,3 +49,268 @@ extension Foundation._BridgedStoredNSError {
49
49
  public var errorCode: Swift.Int { get }
50
50
  public var errorUserInfo: [Swift.String : Any] { get }
51
51
  }
52
+ // the bridging an @objc declaration in a swift interface relies on
53
+ extension Swift.String : Swift._ObjectiveCBridgeable {
54
+ public typealias _ObjectiveCType = Foundation.NSString
55
+ public func _bridgeToObjectiveC() -> Foundation.NSString
56
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSString, result: inout Swift.String?)
57
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSString, result: inout Swift.String?) -> Swift.Bool
58
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSString?) -> Swift.String
59
+ }
60
+ extension Swift.Array : Swift._ObjectiveCBridgeable {
61
+ public typealias _ObjectiveCType = Foundation.NSArray
62
+ public func _bridgeToObjectiveC() -> Foundation.NSArray
63
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSArray, result: inout Swift.Array<Element>?)
64
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSArray, result: inout Swift.Array<Element>?) -> Swift.Bool
65
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSArray?) -> Swift.Array<Element>
66
+ }
67
+ extension Swift.Dictionary : Swift._ObjectiveCBridgeable {
68
+ public typealias _ObjectiveCType = Foundation.NSDictionary
69
+ public func _bridgeToObjectiveC() -> Foundation.NSDictionary
70
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSDictionary, result: inout Swift.Dictionary<Key, Value>?)
71
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSDictionary, result: inout Swift.Dictionary<Key, Value>?) -> Swift.Bool
72
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSDictionary?) -> Swift.Dictionary<Key, Value>
73
+ }
74
+ extension Swift.Set : Swift._ObjectiveCBridgeable {
75
+ public typealias _ObjectiveCType = Foundation.NSSet
76
+ public func _bridgeToObjectiveC() -> Foundation.NSSet
77
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSSet, result: inout Swift.Set<Element>?)
78
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSSet, result: inout Swift.Set<Element>?) -> Swift.Bool
79
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSSet?) -> Swift.Set<Element>
80
+ }
81
+ extension Swift.AnyHashable : Swift._ObjectiveCBridgeable {
82
+ public typealias _ObjectiveCType = ObjectiveC.NSObject
83
+ public func _bridgeToObjectiveC() -> ObjectiveC.NSObject
84
+ public static func _forceBridgeFromObjectiveC(_ source: ObjectiveC.NSObject, result: inout Swift.AnyHashable?)
85
+ public static func _conditionallyBridgeFromObjectiveC(_ source: ObjectiveC.NSObject, result: inout Swift.AnyHashable?) -> Swift.Bool
86
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: ObjectiveC.NSObject?) -> Swift.AnyHashable
87
+ }
88
+ extension Swift.Int : Swift._ObjectiveCBridgeable {
89
+ public typealias _ObjectiveCType = Foundation.NSNumber
90
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
91
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int?)
92
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int?) -> Swift.Bool
93
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Int
94
+ }
95
+ extension Swift.Int8 : Swift._ObjectiveCBridgeable {
96
+ public typealias _ObjectiveCType = Foundation.NSNumber
97
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
98
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int8?)
99
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int8?) -> Swift.Bool
100
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Int8
101
+ }
102
+ extension Swift.Int16 : Swift._ObjectiveCBridgeable {
103
+ public typealias _ObjectiveCType = Foundation.NSNumber
104
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
105
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int16?)
106
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int16?) -> Swift.Bool
107
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Int16
108
+ }
109
+ extension Swift.Int32 : Swift._ObjectiveCBridgeable {
110
+ public typealias _ObjectiveCType = Foundation.NSNumber
111
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
112
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int32?)
113
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int32?) -> Swift.Bool
114
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Int32
115
+ }
116
+ extension Swift.Int64 : Swift._ObjectiveCBridgeable {
117
+ public typealias _ObjectiveCType = Foundation.NSNumber
118
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
119
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int64?)
120
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Int64?) -> Swift.Bool
121
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Int64
122
+ }
123
+ extension Swift.UInt : Swift._ObjectiveCBridgeable {
124
+ public typealias _ObjectiveCType = Foundation.NSNumber
125
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
126
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt?)
127
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt?) -> Swift.Bool
128
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.UInt
129
+ }
130
+ extension Swift.UInt8 : Swift._ObjectiveCBridgeable {
131
+ public typealias _ObjectiveCType = Foundation.NSNumber
132
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
133
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt8?)
134
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt8?) -> Swift.Bool
135
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.UInt8
136
+ }
137
+ extension Swift.UInt16 : Swift._ObjectiveCBridgeable {
138
+ public typealias _ObjectiveCType = Foundation.NSNumber
139
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
140
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt16?)
141
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt16?) -> Swift.Bool
142
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.UInt16
143
+ }
144
+ extension Swift.UInt32 : Swift._ObjectiveCBridgeable {
145
+ public typealias _ObjectiveCType = Foundation.NSNumber
146
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
147
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt32?)
148
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt32?) -> Swift.Bool
149
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.UInt32
150
+ }
151
+ extension Swift.UInt64 : Swift._ObjectiveCBridgeable {
152
+ public typealias _ObjectiveCType = Foundation.NSNumber
153
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
154
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt64?)
155
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.UInt64?) -> Swift.Bool
156
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.UInt64
157
+ }
158
+ extension Swift.Float : Swift._ObjectiveCBridgeable {
159
+ public typealias _ObjectiveCType = Foundation.NSNumber
160
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
161
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Float?)
162
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Float?) -> Swift.Bool
163
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Float
164
+ }
165
+ extension Swift.Double : Swift._ObjectiveCBridgeable {
166
+ public typealias _ObjectiveCType = Foundation.NSNumber
167
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
168
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Double?)
169
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Double?) -> Swift.Bool
170
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Double
171
+ }
172
+ extension Swift.Bool : Swift._ObjectiveCBridgeable {
173
+ public typealias _ObjectiveCType = Foundation.NSNumber
174
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
175
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Bool?)
176
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout Swift.Bool?) -> Swift.Bool
177
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> Swift.Bool
178
+ }
179
+ extension CoreGraphics.CGFloat : Swift._ObjectiveCBridgeable {
180
+ public typealias _ObjectiveCType = Foundation.NSNumber
181
+ public func _bridgeToObjectiveC() -> Foundation.NSNumber
182
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout CoreGraphics.CGFloat?)
183
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber, result: inout CoreGraphics.CGFloat?) -> Swift.Bool
184
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNumber?) -> CoreGraphics.CGFloat
185
+ }
186
+ extension Foundation.URL : Swift._ObjectiveCBridgeable {
187
+ public typealias _ObjectiveCType = Foundation.NSURL
188
+ public func _bridgeToObjectiveC() -> Foundation.NSURL
189
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSURL, result: inout Foundation.URL?)
190
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSURL, result: inout Foundation.URL?) -> Swift.Bool
191
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSURL?) -> Foundation.URL
192
+ }
193
+ extension Foundation.Data : Swift._ObjectiveCBridgeable {
194
+ public typealias _ObjectiveCType = Foundation.NSData
195
+ public func _bridgeToObjectiveC() -> Foundation.NSData
196
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSData, result: inout Foundation.Data?)
197
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSData, result: inout Foundation.Data?) -> Swift.Bool
198
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSData?) -> Foundation.Data
199
+ }
200
+ extension Foundation.Date : Swift._ObjectiveCBridgeable {
201
+ public typealias _ObjectiveCType = Foundation.NSDate
202
+ public func _bridgeToObjectiveC() -> Foundation.NSDate
203
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSDate, result: inout Foundation.Date?)
204
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSDate, result: inout Foundation.Date?) -> Swift.Bool
205
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSDate?) -> Foundation.Date
206
+ }
207
+ extension Foundation.DateComponents : Swift._ObjectiveCBridgeable {
208
+ public typealias _ObjectiveCType = Foundation.NSDateComponents
209
+ public func _bridgeToObjectiveC() -> Foundation.NSDateComponents
210
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSDateComponents, result: inout Foundation.DateComponents?)
211
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSDateComponents, result: inout Foundation.DateComponents?) -> Swift.Bool
212
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSDateComponents?) -> Foundation.DateComponents
213
+ }
214
+ extension Foundation.DateInterval : Swift._ObjectiveCBridgeable {
215
+ public typealias _ObjectiveCType = Foundation.NSDateInterval
216
+ public func _bridgeToObjectiveC() -> Foundation.NSDateInterval
217
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSDateInterval, result: inout Foundation.DateInterval?)
218
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSDateInterval, result: inout Foundation.DateInterval?) -> Swift.Bool
219
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSDateInterval?) -> Foundation.DateInterval
220
+ }
221
+ extension Foundation.URLComponents : Swift._ObjectiveCBridgeable {
222
+ public typealias _ObjectiveCType = Foundation.NSURLComponents
223
+ public func _bridgeToObjectiveC() -> Foundation.NSURLComponents
224
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSURLComponents, result: inout Foundation.URLComponents?)
225
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSURLComponents, result: inout Foundation.URLComponents?) -> Swift.Bool
226
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSURLComponents?) -> Foundation.URLComponents
227
+ }
228
+ extension Foundation.URLQueryItem : Swift._ObjectiveCBridgeable {
229
+ public typealias _ObjectiveCType = Foundation.NSURLQueryItem
230
+ public func _bridgeToObjectiveC() -> Foundation.NSURLQueryItem
231
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSURLQueryItem, result: inout Foundation.URLQueryItem?)
232
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSURLQueryItem, result: inout Foundation.URLQueryItem?) -> Swift.Bool
233
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSURLQueryItem?) -> Foundation.URLQueryItem
234
+ }
235
+ extension Foundation.URLRequest : Swift._ObjectiveCBridgeable {
236
+ public typealias _ObjectiveCType = Foundation.NSURLRequest
237
+ public func _bridgeToObjectiveC() -> Foundation.NSURLRequest
238
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSURLRequest, result: inout Foundation.URLRequest?)
239
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSURLRequest, result: inout Foundation.URLRequest?) -> Swift.Bool
240
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSURLRequest?) -> Foundation.URLRequest
241
+ }
242
+ extension Foundation.UUID : Swift._ObjectiveCBridgeable {
243
+ public typealias _ObjectiveCType = Foundation.NSUUID
244
+ public func _bridgeToObjectiveC() -> Foundation.NSUUID
245
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSUUID, result: inout Foundation.UUID?)
246
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSUUID, result: inout Foundation.UUID?) -> Swift.Bool
247
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSUUID?) -> Foundation.UUID
248
+ }
249
+ extension Foundation.IndexPath : Swift._ObjectiveCBridgeable {
250
+ public typealias _ObjectiveCType = Foundation.NSIndexPath
251
+ public func _bridgeToObjectiveC() -> Foundation.NSIndexPath
252
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSIndexPath, result: inout Foundation.IndexPath?)
253
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSIndexPath, result: inout Foundation.IndexPath?) -> Swift.Bool
254
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSIndexPath?) -> Foundation.IndexPath
255
+ }
256
+ extension Foundation.IndexSet : Swift._ObjectiveCBridgeable {
257
+ public typealias _ObjectiveCType = Foundation.NSIndexSet
258
+ public func _bridgeToObjectiveC() -> Foundation.NSIndexSet
259
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSIndexSet, result: inout Foundation.IndexSet?)
260
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSIndexSet, result: inout Foundation.IndexSet?) -> Swift.Bool
261
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSIndexSet?) -> Foundation.IndexSet
262
+ }
263
+ extension Foundation.CharacterSet : Swift._ObjectiveCBridgeable {
264
+ public typealias _ObjectiveCType = Foundation.NSCharacterSet
265
+ public func _bridgeToObjectiveC() -> Foundation.NSCharacterSet
266
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSCharacterSet, result: inout Foundation.CharacterSet?)
267
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSCharacterSet, result: inout Foundation.CharacterSet?) -> Swift.Bool
268
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSCharacterSet?) -> Foundation.CharacterSet
269
+ }
270
+ extension Foundation.Locale : Swift._ObjectiveCBridgeable {
271
+ public typealias _ObjectiveCType = Foundation.NSLocale
272
+ public func _bridgeToObjectiveC() -> Foundation.NSLocale
273
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSLocale, result: inout Foundation.Locale?)
274
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSLocale, result: inout Foundation.Locale?) -> Swift.Bool
275
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSLocale?) -> Foundation.Locale
276
+ }
277
+ extension Foundation.TimeZone : Swift._ObjectiveCBridgeable {
278
+ public typealias _ObjectiveCType = Foundation.NSTimeZone
279
+ public func _bridgeToObjectiveC() -> Foundation.NSTimeZone
280
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSTimeZone, result: inout Foundation.TimeZone?)
281
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSTimeZone, result: inout Foundation.TimeZone?) -> Swift.Bool
282
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSTimeZone?) -> Foundation.TimeZone
283
+ }
284
+ extension Foundation.Calendar : Swift._ObjectiveCBridgeable {
285
+ public typealias _ObjectiveCType = Foundation.NSCalendar
286
+ public func _bridgeToObjectiveC() -> Foundation.NSCalendar
287
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSCalendar, result: inout Foundation.Calendar?)
288
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSCalendar, result: inout Foundation.Calendar?) -> Swift.Bool
289
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSCalendar?) -> Foundation.Calendar
290
+ }
291
+ extension Foundation.Notification : Swift._ObjectiveCBridgeable {
292
+ public typealias _ObjectiveCType = Foundation.NSNotification
293
+ public func _bridgeToObjectiveC() -> Foundation.NSNotification
294
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSNotification, result: inout Foundation.Notification?)
295
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSNotification, result: inout Foundation.Notification?) -> Swift.Bool
296
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSNotification?) -> Foundation.Notification
297
+ }
298
+ extension Foundation.Decimal : Swift._ObjectiveCBridgeable {
299
+ public typealias _ObjectiveCType = Foundation.NSDecimalNumber
300
+ public func _bridgeToObjectiveC() -> Foundation.NSDecimalNumber
301
+ public static func _forceBridgeFromObjectiveC(_ source: Foundation.NSDecimalNumber, result: inout Foundation.Decimal?)
302
+ public static func _conditionallyBridgeFromObjectiveC(_ source: Foundation.NSDecimalNumber, result: inout Foundation.Decimal?) -> Swift.Bool
303
+ public static func _unconditionallyBridgeFromObjectiveC(_ source: Foundation.NSDecimalNumber?) -> Foundation.Decimal
304
+ }
305
+ public func _convertNSErrorToError(_ error: Foundation.NSError?) -> any Swift.Error
306
+ public func _convertErrorToNSError(_ error: any Swift.Error) -> Foundation.NSError
307
+ public protocol ContiguousBytes {
308
+ func withUnsafeBytes<R>(_ body: (Swift.UnsafeRawBufferPointer) throws -> R) rethrows -> R
309
+ }
310
+ extension Foundation.Data : Swift.Hashable, Swift.Codable, Foundation.ContiguousBytes, Swift.Sendable {
311
+ public static func == (lhs: Foundation.Data, rhs: Foundation.Data) -> Swift.Bool
312
+ public func hash(into hasher: inout Swift.Hasher)
313
+ public init(from decoder: any Swift.Decoder) throws
314
+ public func encode(to encoder: any Swift.Encoder) throws
315
+ public func withUnsafeBytes<R>(_ body: (Swift.UnsafeRawBufferPointer) throws -> R) rethrows -> R
316
+ }
@@ -18,3 +18,5 @@ extension ObjectiveC.NSObject : Swift.CVarArg {
18
18
  }
19
19
  extension ObjectiveC.NSObject : Swift.CustomStringConvertible {}
20
20
  extension ObjectiveC.NSObject : Swift.CustomDebugStringConvertible {}
21
+ public func _convertBoolToObjCBool(_ x: Swift.Bool) -> ObjectiveC.ObjCBool
22
+ public func _convertObjCBoolToBool(_ x: ObjectiveC.ObjCBool) -> Swift.Bool
@@ -12,6 +12,8 @@
12
12
  #define F_GETPATH 50 /* return the full path of the fd */
13
13
  #define F_NOCACHE 48 /* turn data caching off/on for this fd */
14
14
  #define F_FULLFSYNC 51 /* fsync + ask the drive to flush to the media */
15
+ #undef F_DUPFD_CLOEXEC
16
+ #define F_DUPFD_CLOEXEC 67
15
17
 
16
18
  #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
17
19
  #include <sys/_types/_filesec_t.h>
@@ -33,6 +33,9 @@
33
33
 
34
34
  __BEGIN_DECLS
35
35
  // wasi hides scheduling parameters, but its attribute owns their stored value.
36
+ #define PTHREAD_SCOPE_SYSTEM 1
37
+ #define PTHREAD_SCOPE_PROCESS 2
38
+ int pthread_attr_setscope(pthread_attr_t *, int);
36
39
  int pthread_attr_setschedparam(pthread_attr_t *__restrict, const struct sched_param *__restrict);
37
40
  int pthread_getschedparam(pthread_t, int *__restrict, struct sched_param *__restrict);
38
41
  int pthread_setschedparam(pthread_t, int, const struct sched_param *);
@@ -34,6 +34,8 @@ char *gcvt(double, int, char *);
34
34
  #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
35
35
  #ifdef __BLOCKS__
36
36
  int atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
37
+ void qsort_b(void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *))
38
+ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
37
39
  #endif
38
40
  #endif
39
41
  __END_DECLS
@@ -23,8 +23,8 @@ int issetugid(void);
23
23
  int fsctl(const char *, unsigned long, void *, unsigned int);
24
24
  int ffsctl(int, unsigned long, void *, unsigned int);
25
25
  int pthread_getugid_np(uid_t *, gid_t *);
26
- int dup(int);
27
- int dup2(int, int);
26
+ int dup(int) __asm__("__peach_darwin_dup");
27
+ int dup2(int, int) __asm__("__peach_darwin_dup2");
28
28
  int pipe(int [2]);
29
29
  #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
30
30
  long syscall(long, ...);
@@ -48,9 +48,9 @@ automation, inspecting the render tree, and managing sims.
48
48
  | `peach box` | start a local Box or create a cloud Box |
49
49
  | `peach ios` | start an iOS simulator |
50
50
  | `peach android` | start an Android simulator |
51
- | `peach remote` | run a prebuilt bundle on a remote simulator |
51
+ | `peach remote` | run your app on a remote simulator |
52
52
  | `peach open` | run a React Native, Swift or Android app in the simulator |
53
- | `peach preview` | publish an Expo project or bundle as a standalone preview |
53
+ | `peach preview` | publish an Expo project, export, or bundle as a standalone preview |
54
54
  | `peach package` | package one app as a standalone macOS app |
55
55
  | `peach list` | list connected sims or available launch drivers |
56
56
  | `peach use` | select a connected sim |
@@ -4,10 +4,8 @@ import { Script } from 'node:vm'
4
4
  import { brotliCompressSync, constants as zlibConstants, gunzipSync } from 'node:zlib'
5
5
  import { isLoopbackHost } from './backend-origin'
6
6
  import { resolveConnectionInput } from './dev-bundle-resolution'
7
- import { insertExpoKotlinFooter } from './expoKotlinContract'
8
- import { insertExpoSwiftFooter } from './expoSwiftContract'
9
7
  import { readInstalledNativePackageVersionsAsync } from './installed-package-versions'
10
- import { insertNitroFooter, insertTurboFooter } from './nitroContract'
8
+ import { buildNativeBundles, insertNativeBundleFooters } from './native-bundles'
11
9
  import { nodeHttpFetch } from './node-http-fetch'
12
10
  import { insertPackageVersionsFooter } from './packageVersionsContract'
13
11
  import { terminateProcessGroup } from './process-group'
@@ -171,59 +169,13 @@ function prepareChannel({
171
169
  )
172
170
  if (assets.length && !locations)
173
171
  throw new Error('bundle has packaged files but no asset metadata')
174
- const release = (url) => new URL(url.replace(/^\//, ''), assetBaseUrl).href
175
- let nativeMetadata = null
176
- if (expoSwift) {
177
- nativeMetadata = {
178
- expoSwift: {
179
- ...expoSwift.metadata,
180
- modules: expoSwift.metadata.modules.map((artifact) => ({
181
- ...artifact,
182
- url: release(artifact.url),
183
- icuUrl: artifact.icuUrl.startsWith('/')
184
- ? release(artifact.icuUrl)
185
- : artifact.icuUrl,
186
- })),
187
- },
188
- }
189
- source = insertExpoSwiftFooter(source, nativeMetadata.expoSwift)
190
- }
191
- if (expoKotlin) {
192
- const { module } = expoKotlin.metadata
193
- nativeMetadata = {
194
- expoKotlin: {
195
- ...expoKotlin.metadata,
196
- module: module && { ...module, url: release(module.url) },
197
- },
198
- }
199
- source = insertExpoKotlinFooter(source, nativeMetadata.expoKotlin)
200
- }
201
- if (nitro) {
202
- nativeMetadata = {
203
- ...nativeMetadata,
204
- nitro: {
205
- ...nitro.metadata,
206
- url: release(nitro.metadata.url),
207
- icuUrl: nitro.metadata.icuUrl.startsWith('/')
208
- ? release(nitro.metadata.icuUrl)
209
- : nitro.metadata.icuUrl,
210
- },
211
- }
212
- source = insertNitroFooter(source, nativeMetadata.nitro)
213
- }
214
- if (turbo) {
215
- nativeMetadata = {
216
- ...nativeMetadata,
217
- turbo: {
218
- ...turbo.metadata,
219
- url: release(turbo.metadata.url),
220
- icuUrl: turbo.metadata.icuUrl.startsWith('/')
221
- ? release(turbo.metadata.icuUrl)
222
- : turbo.metadata.icuUrl,
223
- },
224
- }
225
- source = insertTurboFooter(source, nativeMetadata.turbo)
226
- }
172
+ const attached = insertNativeBundleFooters(
173
+ source,
174
+ { expoSwift, expoKotlin, nitro, turbo },
175
+ (path) => new URL(path, assetBaseUrl).href,
176
+ )
177
+ source = attached.source
178
+ const nativeMetadata = attached.metadata
227
179
  new Script(source, { filename: 'peach-release-bundle.js' })
228
180
  const bundleBytes = Buffer.from(source)
229
181
  const metadata = {
@@ -383,22 +335,7 @@ async function packagePlatformBundle(
383
335
  ),
384
336
  ),
385
337
  assets: [...assets].map(([path, bytes]) => ({ path, bytes })),
386
- ...(platform === 'ios'
387
- ? {
388
- expoSwift: await (
389
- await import('./expo-swift-bundle')
390
- ).buildExpoSwiftBundle(projectRoot),
391
- nitro: await (await import('./nitro-bundle')).buildNitroBundle(
392
- projectRoot,
393
- configuration,
394
- ),
395
- turbo: await (await import('./turbo-bundle')).buildTurboBundle(projectRoot),
396
- }
397
- : {
398
- expoKotlin: await (
399
- await import('./expo-kotlin-bundle')
400
- ).buildExpoKotlinBundle(projectRoot),
401
- }),
338
+ ...(await buildNativeBundles(projectRoot, platform, configuration)),
402
339
  }
403
340
  }
404
341
 
@@ -214,12 +214,14 @@ function rasterLayerFrame(node: RnxRasterRegionTree['nodes'][number]): RnxCaptur
214
214
  // its own layer: glass larger than a layer may hold (a sheet's material) is
215
215
  // captured without its children, which stay semantic and paint over it, and
216
216
  // the glass controls inside it keep their own regions.
217
- // the pixel ratio the atlas budget is sized for
218
- const RNX_SELECTION_PIXEL_RATIO = 3
219
-
220
217
  export type RnxRasterSelection = { nodeIds: Set<number>; ownPaint: Set<number> }
221
218
 
222
- export function selectRnxRasterNodeIds(tree: RnxRasterRegionTree): RnxRasterSelection {
219
+ // `pixelRatio` is the density the producer packs the atlas at, so the trial
220
+ // pack here prunes exactly what the producer would fail to pack.
221
+ export function selectRnxRasterNodeIds(
222
+ tree: RnxRasterRegionTree,
223
+ pixelRatio: number,
224
+ ): RnxRasterSelection {
223
225
  const nodesById = new Map(tree.nodes.map((node) => [node.nodeId, node]))
224
226
  const maxLayerArea = tree.width * tree.height * 0.25
225
227
  const eligible = new Map<
@@ -271,7 +273,7 @@ export function selectRnxRasterNodeIds(tree: RnxRasterRegionTree): RnxRasterSele
271
273
  // live video and own-paint glass (a whole sheet's material) claim the atlas
272
274
  // first, up to a screen between them; the other layers follow smallest
273
275
  // first, up to half a screen of their own. the whole atlas stays within a
274
- // screen and a quarter, which the packer's pixel budget holds at 3x.
276
+ // screen and a quarter, which the packer's pixel budget holds at the producer's density.
275
277
  const candidates = [...eligible.values()].sort(
276
278
  (left, right) =>
277
279
  Number(right.liveVideo) - Number(left.liveVideo) ||
@@ -303,10 +305,10 @@ export function selectRnxRasterNodeIds(tree: RnxRasterRegionTree): RnxRasterSele
303
305
  while (picked.length > 0) {
304
306
  const fits = fitRnxCaptureRegions(
305
307
  rnxRasterRegionRequests(tree, selection),
306
- RNX_SELECTION_PIXEL_RATIO,
308
+ pixelRatio,
307
309
  {
308
- pixelWidth: Math.round(tree.width * RNX_SELECTION_PIXEL_RATIO),
309
- pixelHeight: Math.round(tree.height * RNX_SELECTION_PIXEL_RATIO),
310
+ pixelWidth: Math.round(tree.width * pixelRatio),
311
+ pixelHeight: Math.round(tree.height * pixelRatio),
310
312
  },
311
313
  )
312
314
  if (fits) break
@@ -419,6 +421,7 @@ function liquidGlassPaintOutset(
419
421
 
420
422
  export function rnxCaptureRasterRegions(
421
423
  capture: RnxScreenCapture,
424
+ pixelRatio: number,
422
425
  ): RnxCaptureRegionRequest[] {
423
426
  const tree: RnxRasterRegionTree = {
424
427
  width: capture.tree.viewport.width,
@@ -436,7 +439,7 @@ export function rnxCaptureRasterRegions(
436
439
  visibleFrame: node.layout.visibleFrame,
437
440
  })),
438
441
  }
439
- const selection = selectRnxRasterNodeIds(tree)
442
+ const selection = selectRnxRasterNodeIds(tree, pixelRatio)
440
443
  return rnxRasterRegionRequests(tree, selection)
441
444
  }
442
445
 
@@ -21,9 +21,23 @@ export const DESKTOP_HOST_CHANNELS = ['production', 'staging'] as const
21
21
  export type DesktopHostChannel = (typeof DESKTOP_HOST_CHANNELS)[number]
22
22
  const CHANNEL_ENV = 'PEACH_DESKTOP_CHANNEL'
23
23
 
24
+ // the mac host targets macOS 26 (packages/peach-desktop/native/Info.plist
25
+ // LSMinimumSystemVersion): an older mac cannot launch it, so it gets no host
26
+ // and opens the simulator in the browser window, as a mac without one does.
27
+ const MAC_HOST_MINIMUM_MAJOR = 26
28
+ let macMeetsHostMinimum: boolean | undefined
29
+
24
30
  /** the artifact platform this machine installs, or null where no host ships. */
25
31
  export function desktopHostPlatform(): 'mac-arm64' | 'linux-x64' | null {
26
- if (process.platform === 'darwin' && process.arch === 'arm64') return 'mac-arm64'
32
+ if (process.platform === 'darwin' && process.arch === 'arm64') {
33
+ macMeetsHostMinimum ??=
34
+ Number(
35
+ /<key>ProductVersion<\/key>\s*<string>(\d+)/.exec(
36
+ fs.readFileSync('/System/Library/CoreServices/SystemVersion.plist', 'utf8'),
37
+ )?.[1],
38
+ ) >= MAC_HOST_MINIMUM_MAJOR
39
+ return macMeetsHostMinimum ? 'mac-arm64' : null
40
+ }
27
41
  if (process.platform === 'linux' && process.arch === 'x64') return 'linux-x64'
28
42
  return null
29
43
  }
@@ -301,7 +315,7 @@ export function desktopHostDelivery(channelInput?: string): RuntimeDelivery {
301
315
  const platform = desktopHostPlatform()
302
316
  if (!platform) {
303
317
  throw new Error(
304
- `the native desktop host ships for macOS arm64 and Linux x64 (this is ${process.platform}-${process.arch})`,
318
+ `the native desktop host ships for Apple silicon on macOS ${MAC_HOST_MINIMUM_MAJOR} or later and Linux x64 (this is ${process.platform}-${process.arch}); open the simulator with --driver playwright --headed`,
305
319
  )
306
320
  }
307
321
  const channel = channelInput || process.env[CHANNEL_ENV] || 'production'
@@ -287,6 +287,17 @@ export async function fetchDevManifest(
287
287
  }
288
288
  }
289
289
 
290
+ export async function metroRequestFailure(
291
+ request: string,
292
+ url: string,
293
+ response: Response,
294
+ ): Promise<Error> {
295
+ const detail = (await response.text()).trim().slice(0, 2000)
296
+ return new Error(
297
+ `Metro ${request} request failed: HTTP ${response.status} at ${url}/${detail ? `: ${detail}` : ''}`,
298
+ )
299
+ }
300
+
290
301
  async function probeExpoManifest(
291
302
  normalizedBaseUrl: string,
292
303
  port: number,
@@ -296,9 +307,7 @@ async function probeExpoManifest(
296
307
  const answered = await fetchDevManifest(normalizedBaseUrl, pageOrigin, options)
297
308
  if (answered.status === 404 || answered.status === 405) return { state: 'no-manifest' }
298
309
  if (answered.status < 200 || answered.status >= 300)
299
- throw new Error(
300
- `Metro manifest request failed: HTTP ${answered.status} at ${normalizedBaseUrl}/`,
301
- )
310
+ throw await metroRequestFailure('manifest', normalizedBaseUrl, answered)
302
311
  const body = await answered.text()
303
312
  if (!body.trim()) return { state: 'no-answer' }
304
313