peachsim 0.1.1738 → 0.1.1744

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 (327) hide show
  1. package/README.md +4 -0
  2. package/cli/app-catalog.ts +47 -23
  3. package/cli/app-fonts.ts +19 -1
  4. package/cli/command-registry.ts +3 -0
  5. package/cli/commands/control.ts +67 -16
  6. package/cli/commands/device.ts +3 -1
  7. package/cli/commands/doctor.ts +1 -4
  8. package/cli/commands/inspect/settling.ts +6 -1
  9. package/cli/commands/inspect/wait-ready.ts +22 -2
  10. package/cli/commands/package.ts +22 -20
  11. package/cli/commands/push.ts +56 -0
  12. package/cli/commands/serve.ts +9 -0
  13. package/cli/commands/shell-url.ts +37 -9
  14. package/cli/commands/swift.ts +1 -1
  15. package/cli/current-sim.ts +27 -0
  16. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  17. package/cli/drivers/linux-browser-libs.ts +8 -6
  18. package/cli/drivers/playwright.ts +5 -1
  19. package/cli/internal-child.ts +11 -1
  20. package/cli/main.ts +6 -0
  21. package/cli/native-input.ts +1 -7
  22. package/cli/outbound-endpoints.ts +9 -1
  23. package/cli/packaged-app-launcher.ts +3 -1
  24. package/cli/scene-video.ts +4 -0
  25. package/cli/ws-bridge.ts +3 -1
  26. package/detox/index.ts +9 -4
  27. package/dist-lib/agent-daemon-client.cjs +1 -1
  28. package/dist-lib/agent-events.cjs +1 -1
  29. package/dist-lib/attached-projects.cjs +1 -1
  30. package/dist-lib/auth/shared-session.cjs +1 -1
  31. package/dist-lib/backend-origin.cjs +1 -1
  32. package/dist-lib/beta.cjs +1 -1
  33. package/dist-lib/beta.mjs +1 -1
  34. package/dist-lib/bridge-constants.cjs +1 -1
  35. package/dist-lib/bridge-contract-input.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.mjs +1 -1
  37. package/dist-lib/bridge-contract.cjs +1 -1
  38. package/dist-lib/bridge-contract.mjs +1 -1
  39. package/dist-lib/bundle-channel.cjs +7372 -3675
  40. package/dist-lib/capture-contract.cjs +1 -1
  41. package/dist-lib/capture-contract.mjs +1 -1
  42. package/dist-lib/cloud-contract.cjs +1 -1
  43. package/dist-lib/cloud-contract.mjs +1 -1
  44. package/dist-lib/cloud-test-args.cjs +1 -1
  45. package/dist-lib/cloud-test-args.mjs +1 -1
  46. package/dist-lib/cloud.cjs +1 -1
  47. package/dist-lib/cloud.mjs +1 -1
  48. package/dist-lib/config.cjs +1 -1
  49. package/dist-lib/config.mjs +1 -1
  50. package/dist-lib/detox/index.cjs +22 -8
  51. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  52. package/dist-lib/expo-swift-bundle.cjs +6340 -3064
  53. package/dist-lib/expo-swift-metadata.cjs +14 -2
  54. package/dist-lib/expo-swift-metadata.mjs +14 -2
  55. package/dist-lib/home-paths.cjs +1 -1
  56. package/dist-lib/host/bridge-host.cjs +6524 -2720
  57. package/dist-lib/host/fetch-proxy-handler.cjs +8 -7
  58. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  59. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  60. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  61. package/dist-lib/host/websocket-proxy.cjs +6 -3
  62. package/dist-lib/index.cjs +97 -31
  63. package/dist-lib/jump-to-source-babel.cjs +1 -1
  64. package/dist-lib/jump-to-source-native.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +1 -1
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +1 -1
  72. package/dist-lib/metro.cjs +71 -29
  73. package/dist-lib/native-app-identity-project.cjs +53 -22
  74. package/dist-lib/native-app-identity-project.mjs +53 -22
  75. package/dist-lib/native-app-identity.cjs +10 -3
  76. package/dist-lib/native-app-identity.mjs +10 -3
  77. package/dist-lib/native-firebase-metadata.cjs +1 -1
  78. package/dist-lib/native-firebase-metadata.mjs +1 -1
  79. package/dist-lib/plist.cjs +1 -1
  80. package/dist-lib/plist.mjs +1 -1
  81. package/dist-lib/profiles.cjs +1 -1
  82. package/dist-lib/public-brand.cjs +1 -1
  83. package/dist-lib/public-origins-lib-esm.json +25 -23
  84. package/dist-lib/public-origins-lib.json +111 -79
  85. package/dist-lib/react-native-host-modules.cjs +1 -1
  86. package/dist-lib/react-native-host-modules.mjs +1 -1
  87. package/dist-lib/reap-browser.cjs +1 -1
  88. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  89. package/dist-lib/sdk.cjs +4 -1
  90. package/dist-lib/sdk.mjs +4 -1
  91. package/dist-lib/skills.cjs +40549 -37613
  92. package/dist-lib/swift-compile.cjs +2054 -388
  93. package/dist-lib/swift-compile.mjs +1976 -312
  94. package/dist-lib/swift-package.cjs +1 -1
  95. package/dist-lib/swift-package.mjs +1 -1
  96. package/dist-lib/swift-submit.cjs +2 -2
  97. package/dist-lib/swift-submit.mjs +2 -2
  98. package/dist-lib/swift-toolchain.cjs +68 -8
  99. package/dist-lib/swift.cjs +1 -1
  100. package/dist-lib/vite-swift.cjs +5867 -2646
  101. package/dist-lib/vite.cjs +18 -8
  102. package/dist-lib/worklet-executable.cjs +1 -1
  103. package/dist-lib/worklet-executable.mjs +1 -1
  104. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  105. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  107. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +0 -3
  108. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
  109. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  110. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  111. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  112. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  113. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  115. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  116. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  117. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  118. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  119. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  120. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  121. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  122. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  123. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  124. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +8 -0
  125. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  127. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  128. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +1 -0
  131. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  132. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  133. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  134. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  135. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  136. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  137. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  138. package/dist-types/packages/peach-kit/src/capabilities.d.ts +7 -0
  139. package/package.json +2 -1
  140. package/runtime-companion.json +1 -1
  141. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  142. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  143. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  144. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  145. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  146. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  147. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  148. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  149. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  150. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  151. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  152. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  153. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  154. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  155. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  156. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  157. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  158. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  159. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  182. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  183. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +0 -6
  184. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +356 -61
  185. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  186. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  188. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  189. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  190. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  191. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  192. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  193. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  194. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  195. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  196. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  197. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  198. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  199. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  200. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  201. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  218. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  219. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  220. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  221. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  222. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  223. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  224. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  225. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  226. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  227. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  228. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  229. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  230. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  231. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  232. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  233. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  234. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  238. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  239. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  240. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  241. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  242. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  243. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  244. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  245. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  246. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  247. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  248. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  249. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  250. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  251. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  252. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  253. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  254. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  255. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  258. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  259. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  260. package/sdk/ios/usr/include/module.modulemap +1 -0
  261. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  262. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  263. package/sdk/native-hashes.json +1 -1
  264. package/skills/contrast/SKILL.md +6 -5
  265. package/skills/peach-debug/SKILL.md +68 -264
  266. package/skills/peach-debug/references/accessibility.md +37 -73
  267. package/skills/peach-debug/references/commands.md +2 -2
  268. package/skills/peach-debug/references/events.md +74 -0
  269. package/skills/peach-perf/SKILL.md +64 -401
  270. package/skills/peach-perf/references/presentation.md +46 -0
  271. package/skills/peach-perf/references/profiling.md +93 -0
  272. package/skills/peach-perf/references/render-counters.md +57 -0
  273. package/skills/peach-setup/SKILL.md +66 -216
  274. package/skills/peach-setup/references/native-config.md +35 -0
  275. package/skills/peach-setup/references/reporting.md +28 -0
  276. package/skills/peach-test/SKILL.md +68 -284
  277. package/skills/peach-test/references/detox.md +69 -0
  278. package/skills/peach-test/references/maestro.md +95 -0
  279. package/skills/peach-visual/SKILL.md +53 -105
  280. package/src/appPackageContract.ts +12 -1
  281. package/src/assetCatalogContract.ts +8 -1
  282. package/src/bridge-contract.ts +6 -0
  283. package/src/bundle-channel.mjs +133 -59
  284. package/src/cli-runtime.ts +8 -9
  285. package/src/configured-bundle-producer.ts +10 -0
  286. package/src/device-catalog.ts +68 -4
  287. package/src/expo-discovery-cache.ts +3 -0
  288. package/src/expo-native-workspace.ts +81 -17
  289. package/src/expo-swift-host.ts +57 -104
  290. package/src/expo-widget-assets.ts +76 -0
  291. package/src/expoSwiftContract.ts +13 -1
  292. package/src/host/websocket-proxy.ts +7 -2
  293. package/src/native-prebuilt.ts +3 -3
  294. package/src/nitro-adapter.lock.json +263 -263
  295. package/src/nitro-adapter.ts +69 -7
  296. package/src/nitro-bundle.ts +52 -24
  297. package/src/nitro-compile.ts +6 -1
  298. package/src/nitro-source.ts +82 -4
  299. package/src/nitro-superset.lock.json +103 -0
  300. package/src/nitro-superset.ts +137 -0
  301. package/src/nitroContract.ts +5 -1
  302. package/src/react-bridge-importers.ts +1 -0
  303. package/src/settingsContract.ts +26 -1
  304. package/src/swift-compile.ts +267 -68
  305. package/src/swift-compiler-digest.ts +2 -0
  306. package/src/swift-coverage/xcode-packages.ts +61 -1
  307. package/src/swift-coverage/xcode.ts +10 -12
  308. package/src/swift-cxx-reachable.ts +1 -1
  309. package/src/swift-distribution.lock.json +15 -13
  310. package/src/swift-distribution.ts +57 -26
  311. package/src/swift-host.ts +48 -35
  312. package/src/swift-link-roots.ts +45 -18
  313. package/src/swift-objc-compile.ts +78 -2
  314. package/src/swift-objc-standin.ts +3 -0
  315. package/src/swift-shared-sdk.ts +85 -1
  316. package/src/swift-standins.ts +233 -11
  317. package/src/swift-submit.ts +13 -1
  318. package/src/swift-toolchain.ts +82 -7
  319. package/src/swift-wasm-prune.ts +1629 -0
  320. package/src/turbo-bundle.ts +11 -10
  321. package/src/turbo-runtime.lock.json +16 -16
  322. package/src/vite-plugin-one.ts +12 -1
  323. package/src/vite-plugin.ts +82 -23
  324. package/src/wasm-optimize.ts +34 -0
  325. package/src/worker-system-chunks.ts +3 -3
  326. package/src/xcode-project.ts +52 -0
  327. package/src/xcode-target-members.ts +12 -1
@@ -0,0 +1,94 @@
1
+ //
2
+ // resolver_config.h
3
+ // libnetwork
4
+ //
5
+ // Copyright (c) 2020-2023 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef __NW_RESOLVER_CONFIG_H__
9
+ #define __NW_RESOLVER_CONFIG_H__
10
+
11
+ #ifndef __NW_INDIRECT__
12
+ #warning "Please include <Network/Network.h> instead of this file directly."
13
+ #endif // __NW_INDIRECT__
14
+
15
+ #include <Network/nw_object.h>
16
+ #include <Network/endpoint.h>
17
+
18
+
19
+ NW_ASSUME_NONNULL_BEGIN
20
+
21
+ __BEGIN_DECLS
22
+
23
+ /*!
24
+ * @typedef nw_resolver_config_t
25
+ * @abstract
26
+ * A Resolver Config object stores a DNS resolver configuration. These can be
27
+ * used to specify a custom DNS resolver configuration for encrypted DNS protocols,
28
+ * such as DNS-over-HTTPS and DNS-over-TLS.
29
+ *
30
+ * This type supports ARC and the -[description] method. In non-ARC files, use
31
+ * nw_retain() and nw_release() to retain and release the object.
32
+ */
33
+ #ifndef NW_RESOLVER_CONFIG_IMPL
34
+ NW_OBJECT_DECL(nw_resolver_config);
35
+ #endif // NW_RESOLVER_CONFIG_IMPL
36
+
37
+ /*!
38
+ * @function nw_resolver_config_create_https
39
+ *
40
+ * @abstract
41
+ * Creates a DNS-over-HTTPS (DoH) resolver configuration. The provided
42
+ * URL describes the location of the DNS server, such as
43
+ * "https://dnsserver.example.net/dns-query". See RFC 8484.
44
+ *
45
+ * @param url_endpoint
46
+ * The URL template of the DoH server as an endpoint.
47
+ *
48
+ * @result
49
+ * Returns an allocated nw_resolver_config_t object on success.
50
+ */
51
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
52
+ NW_RETURNS_RETAINED nw_resolver_config_t
53
+ nw_resolver_config_create_https(nw_endpoint_t url_endpoint);
54
+
55
+ /*!
56
+ * @function nw_resolver_config_create_tls
57
+ *
58
+ * @abstract
59
+ * Creates a DNS-over-TLS (DoT) resolver configuration. The hostname
60
+ * of the provided endpoint will be used to validate the TLS certificate of the server.
61
+ * See RFC 7858.
62
+ *
63
+ * @param server_endpoint
64
+ * A host endpoint identifying the DoT server.
65
+ *
66
+ * @result
67
+ * Returns an allocated nw_resolver_config_t object on success.
68
+ */
69
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
70
+ NW_RETURNS_RETAINED nw_resolver_config_t
71
+ nw_resolver_config_create_tls(nw_endpoint_t server_endpoint);
72
+
73
+ /*!
74
+ * @function nw_resolver_config_add_name_server
75
+ *
76
+ * @abstract
77
+ * Modifies the resolver configuration by adding a DNS server address as an endpoint.
78
+ *
79
+ * @param config
80
+ * A resolver config object.
81
+ *
82
+ * @param server_address
83
+ * A server address to assign to the configuration, as an endpoint.
84
+ */
85
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
86
+ void
87
+ nw_resolver_config_add_server_address(nw_resolver_config_t config,
88
+ nw_endpoint_t server_address);
89
+
90
+ __END_DECLS
91
+
92
+ NW_ASSUME_NONNULL_END
93
+
94
+ #endif // __NW_RESOLVER_CONFIG_H__
@@ -0,0 +1,459 @@
1
+ //
2
+ // tcp_options.h
3
+ // Network
4
+ //
5
+ // Copyright (c) 2017-2020 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef __NW_TCP_OPTIONS_H__
9
+ #define __NW_TCP_OPTIONS_H__
10
+
11
+ #ifndef __NW_INDIRECT__
12
+ #warning "Please include <Network/Network.h> instead of this file directly."
13
+ #endif // __NW_INDIRECT__
14
+
15
+ #include <Network/protocol_options.h>
16
+
17
+ #include <uuid/uuid.h>
18
+
19
+
20
+ __BEGIN_DECLS
21
+
22
+ NW_ASSUME_NONNULL_BEGIN
23
+
24
+ /*!
25
+ * @function nw_protocol_copy_tcp_definition
26
+ *
27
+ * @abstract
28
+ * Access the definition of the default system protocol implementation
29
+ * of TCP (Transmission Control Protocol). This protocol can be used
30
+ * as part of a connection's protocol stack as the transport protocol.
31
+ *
32
+ * @result
33
+ * Returns a retained protocol definition object.
34
+ */
35
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
36
+ NW_RETURNS_RETAINED nw_protocol_definition_t
37
+ nw_protocol_copy_tcp_definition(void);
38
+
39
+ #pragma mark - Options
40
+
41
+ /*!
42
+ * @function nw_tcp_create_options
43
+ *
44
+ * @abstract
45
+ * Create an instance of TCP protocol options. This object can be added
46
+ * to an nw_protocol_stack_t to be used in an nw_connection_t or
47
+ * an nw_listener_t.
48
+ *
49
+ * @result
50
+ * Returns a retained protocol options object.
51
+ */
52
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
53
+ NW_RETURNS_RETAINED nw_protocol_options_t
54
+ nw_tcp_create_options(void);
55
+
56
+ /*!
57
+ * @function nw_tcp_options_set_no_delay
58
+ *
59
+ * @abstract
60
+ * Configure TCP to disable Nagle's algorithm, which will
61
+ * delay sending packets to coalesce sending.
62
+ *
63
+ * @param options
64
+ * A TCP protocol options object.
65
+ *
66
+ * @param no_delay
67
+ * A boolean indicating that TCP should disable
68
+ * Nagle's algorithm.
69
+ */
70
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
71
+ void
72
+ nw_tcp_options_set_no_delay(nw_protocol_options_t options,
73
+ bool no_delay);
74
+
75
+ /*!
76
+ * @function nw_tcp_options_set_no_push
77
+ *
78
+ * @abstract
79
+ * Wait to send TCP data until the connection has finished
80
+ * writing, or else the TCP send buffer is full.
81
+ *
82
+ * @param options
83
+ * A TCP protocol options object.
84
+ *
85
+ * @param no_push
86
+ * A boolean indicating that TCP should use no-push mode.
87
+ */
88
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
89
+ void
90
+ nw_tcp_options_set_no_push(nw_protocol_options_t options,
91
+ bool no_push);
92
+
93
+ /*!
94
+ * @function nw_tcp_options_set_no_options
95
+ *
96
+ * @abstract
97
+ * Disable sending TCP options and extensions.
98
+ *
99
+ * @param options
100
+ * A TCP protocol options object.
101
+ *
102
+ * @param no_options
103
+ * A boolean indicating that TCP should use no-options mode.
104
+ */
105
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
106
+ void
107
+ nw_tcp_options_set_no_options(nw_protocol_options_t options,
108
+ bool no_options);
109
+
110
+ /*!
111
+ * @function nw_tcp_options_set_enable_keepalive
112
+ *
113
+ * @abstract
114
+ * Enable sending TCP keepalive probes.
115
+ *
116
+ * @param options
117
+ * A TCP protocol options object.
118
+ *
119
+ * @param enable_keepalive
120
+ * A boolean indicating that TCP should send keepalives.
121
+ */
122
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
123
+ void
124
+ nw_tcp_options_set_enable_keepalive(nw_protocol_options_t options,
125
+ bool enable_keepalive);
126
+
127
+ /*!
128
+ * @function nw_tcp_options_set_keepalive_count
129
+ *
130
+ * @abstract
131
+ * Configure the number of times TCP keepalive probes
132
+ * should be sent without reply before terminating
133
+ * the connection.
134
+ *
135
+ * @param options
136
+ * A TCP protocol options object.
137
+ *
138
+ * @param keepalive_count
139
+ * The number of keepalive probes to send before terminating
140
+ * the connection.
141
+ */
142
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
143
+ void
144
+ nw_tcp_options_set_keepalive_count(nw_protocol_options_t options,
145
+ uint32_t keepalive_count);
146
+
147
+ /*!
148
+ * @function nw_tcp_options_set_keepalive_idle_time
149
+ *
150
+ * @abstract
151
+ * Configure the amount of time that a connection must be
152
+ * idle before TCP should start sending keepalive probes.
153
+ *
154
+ * @param options
155
+ * A TCP protocol options object.
156
+ *
157
+ * @param keepalive_idle_time
158
+ * The number of seconds of idleness to wait before keepalive
159
+ * probes are sent by TCP.
160
+ */
161
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
162
+ void
163
+ nw_tcp_options_set_keepalive_idle_time(nw_protocol_options_t options,
164
+ uint32_t keepalive_idle_time);
165
+
166
+ /*!
167
+ * @function nw_tcp_options_set_keepalive_interval
168
+ *
169
+ * @abstract
170
+ * Configure the amount of time between sending TCP keepalive
171
+ * probes when the peer is not responding.
172
+ *
173
+ * @param options
174
+ * A TCP protocol options object.
175
+ *
176
+ * @param keepalive_interval
177
+ * The number of seconds of to wait before resending TCP
178
+ * keepalive probes.
179
+ */
180
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
181
+ void
182
+ nw_tcp_options_set_keepalive_interval(nw_protocol_options_t options,
183
+ uint32_t keepalive_interval);
184
+
185
+ /*!
186
+ * @function nw_tcp_options_set_maximum_segment_size
187
+ *
188
+ * @abstract
189
+ * Directly configure the maximum segment size (MSS)
190
+ * TCP will use.
191
+ *
192
+ * @param options
193
+ * A TCP protocol options object.
194
+ *
195
+ * @param maximum_segment_size
196
+ * The maximum segment size in bytes.
197
+ */
198
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
199
+ void
200
+ nw_tcp_options_set_maximum_segment_size(nw_protocol_options_t options,
201
+ uint32_t maximum_segment_size);
202
+
203
+ /*!
204
+ * @function nw_tcp_options_set_connection_timeout
205
+ *
206
+ * @abstract
207
+ * Define a timeout value after which TCP connection
208
+ * establishment will give up.
209
+ *
210
+ * @param options
211
+ * A TCP protocol options object.
212
+ *
213
+ * @param connection_timeout
214
+ * A timeout for TCP connection establishment, in seconds.
215
+ */
216
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
217
+ void
218
+ nw_tcp_options_set_connection_timeout(nw_protocol_options_t options,
219
+ uint32_t connection_timeout);
220
+
221
+ /*!
222
+ * @function nw_tcp_options_set_persist_timeout
223
+ *
224
+ * @abstract
225
+ * Define a timeout value after which TCP connections
226
+ * in the persist state will terminate. See RFC 6429.
227
+ *
228
+ * @param options
229
+ * A TCP protocol options object.
230
+ *
231
+ * @param persist_timeout
232
+ * The TCP persist timeout, in seconds.
233
+ */
234
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
235
+ void
236
+ nw_tcp_options_set_persist_timeout(nw_protocol_options_t options,
237
+ uint32_t persist_timeout);
238
+
239
+ /*!
240
+ * @function nw_tcp_options_set_retransmit_connection_drop_time
241
+ *
242
+ * @abstract
243
+ * Define a timeout value after which TCP will drop
244
+ * a connection with unacknowledged retransmissions.
245
+ *
246
+ * @param options
247
+ * A TCP protocol options object.
248
+ *
249
+ * @param retransmit_connection_drop_time
250
+ * A timeout for TCP retransmission attempts, in seconds.
251
+ */
252
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
253
+ void
254
+ nw_tcp_options_set_retransmit_connection_drop_time(nw_protocol_options_t options,
255
+ uint32_t retransmit_connection_drop_time);
256
+
257
+ /*!
258
+ * @function nw_tcp_options_set_retransmit_fin_drop
259
+ *
260
+ * @abstract
261
+ * Cause TCP to drop connections after not receiving
262
+ * an ACK multiple times after a FIN, currently set at three.
263
+ *
264
+ * @param options
265
+ * A TCP protocol options object.
266
+ *
267
+ * @param retransmit_fin_drop
268
+ * A boolean to cause TCP to drop its connection after
269
+ * not receiving an ACK after a FIN.
270
+ */
271
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
272
+ void
273
+ nw_tcp_options_set_retransmit_fin_drop(nw_protocol_options_t options,
274
+ bool retransmit_fin_drop);
275
+
276
+ /*!
277
+ * @function nw_tcp_options_set_disable_ack_stretching
278
+ *
279
+ * @abstract
280
+ * Configure TCP to disable ACK stretching. ACKs will be sent
281
+ * for every other data packet.
282
+ *
283
+ * @param options
284
+ * A TCP protocol options object.
285
+ *
286
+ * @param disable_ack_stretching
287
+ * A boolean to cause TCP to disable ACK stretching.
288
+ */
289
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
290
+ void
291
+ nw_tcp_options_set_disable_ack_stretching(nw_protocol_options_t options,
292
+ bool disable_ack_stretching);
293
+
294
+ /*!
295
+ * @function nw_tcp_options_set_enable_fast_open
296
+ *
297
+ * @abstract
298
+ * Configure TCP to enable TCP Fast Open (TFO). This may take effect
299
+ * even when TCP is not the top-level protocol in the protocol stack.
300
+ * For example, if TLS is running over TCP, the Client Hello message
301
+ * may be sent as fast open data.
302
+ *
303
+ * If TCP is the top-level protocol in the stack (the one the application
304
+ * directly interacts with), TFO will be disabled unless the application
305
+ * indicated that it will provide its own fast open data by calling
306
+ * nw_parameters_set_fast_open_enabled().
307
+ *
308
+ * @param options
309
+ * A TCP protocol options object.
310
+ *
311
+ * @param enable_fast_open
312
+ * A boolean to enable TFO.
313
+ */
314
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
315
+ void
316
+ nw_tcp_options_set_enable_fast_open(nw_protocol_options_t options,
317
+ bool enable_fast_open);
318
+
319
+ /*!
320
+ * @function nw_tcp_options_set_disable_ecn
321
+ *
322
+ * @abstract
323
+ * Configure TCP to disable default Explicit Congestion
324
+ * Notification (ECN) behavior.
325
+ *
326
+ * @param options
327
+ * A TCP protocol options object.
328
+ *
329
+ * @param disable_ecn
330
+ * A boolean to disable ECN support in TCP.
331
+ */
332
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
333
+ void
334
+ nw_tcp_options_set_disable_ecn(nw_protocol_options_t options,
335
+ bool disable_ecn);
336
+
337
+ /*!
338
+ * @typedef nw_multipath_version_t
339
+ * @abstract
340
+ * Multipath versions represent the MPTCP standard versions
341
+ */
342
+ typedef enum {
343
+ /*! @const nw_multipath_version_unspecified MPTCP unspecified version */
344
+ nw_multipath_version_unspecified = -1,
345
+ /*! @const nw_multipath_version_0 MPTCP version 0 */
346
+ nw_multipath_version_0 = 0,
347
+ /*! @const nw_multipath_version_1 MPTCP version 1 */
348
+ nw_multipath_version_1 = 1,
349
+ } nw_multipath_version_t;
350
+
351
+ /*!
352
+ * @function nw_tcp_options_set_multipath_force_version
353
+ *
354
+ * @abstract
355
+ * Configure MPTCP to use a specified MPTCP standard version.
356
+ * This ignores the cached value from MPTCP version discovery.
357
+ *
358
+ * @param options
359
+ * A TCP protocol options object.
360
+ *
361
+ * @param multipath_force_version
362
+ * The MPTCP version.
363
+ */
364
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
365
+ void
366
+ nw_tcp_options_set_multipath_force_version(nw_protocol_options_t options,
367
+ nw_multipath_version_t multipath_force_version);
368
+
369
+ #pragma mark - Metadata
370
+
371
+ /*!
372
+ * @function nw_protocol_metadata_is_tcp
373
+ *
374
+ * @abstract
375
+ * Checks if a protocol metadata object is compatible with the
376
+ * accessors defined in this file for the default system
377
+ * implementation of TCP.
378
+ *
379
+ * @result
380
+ * Returns true if the metadata is for the default system TCP,
381
+ * false otherwise.
382
+ */
383
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
384
+ bool
385
+ nw_protocol_metadata_is_tcp(nw_protocol_metadata_t metadata);
386
+
387
+ /*!
388
+ * @function nw_tcp_get_available_receive_buffer
389
+ *
390
+ * @abstract
391
+ * Fetch the number of bytes waiting to be read from the receive buffer.
392
+ *
393
+ * @result
394
+ * The number of bytes available in the receive buffer.
395
+ */
396
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
397
+ uint32_t
398
+ nw_tcp_get_available_receive_buffer(nw_protocol_metadata_t metadata);
399
+
400
+ /*!
401
+ * @function nw_tcp_get_available_send_buffer
402
+ *
403
+ * @abstract
404
+ * Fetch the number of bytes waiting to be acknowledged in the send buffer.
405
+ *
406
+ * @result
407
+ * The number of bytes waiting to be acknowledged.
408
+ */
409
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
410
+ uint32_t
411
+ nw_tcp_get_available_send_buffer(nw_protocol_metadata_t metadata);
412
+
413
+ /*!
414
+ * @function nw_tcp_set_max_pacing_rate
415
+ *
416
+ * @abstract
417
+ * Set a maximum pacing rate for a TCP connection, in bytes per second.
418
+ *
419
+ * @discussion
420
+ * TCP pacing spreads outgoing packet transmission across time to avoid
421
+ * bursts and reduce queueing in the network. With a cap in place, the
422
+ * on-wire rate is the minimum of (a) this cap, and (b) the rate computed
423
+ * from the congestion window divided by smoothed RTT. The cap therefore
424
+ * never raises throughput above what congestion control would otherwise
425
+ * allow.
426
+ *
427
+ * A value of 0 or UINT64_MAX disables pacing on this connection — the
428
+ * connection sends without pacing (subject only to congestion control).
429
+ *
430
+ * Rates in the open interval (0, 12500) are silently clamped up to
431
+ * 12500 bytes/second (100 Kbps). Callers needing genuinely sub-100-Kbps
432
+ * pacing must shape at the application layer.
433
+ *
434
+ * The cap may be updated at any time during the lifetime of an
435
+ * established connection. Each call replaces the prior value.
436
+ *
437
+ * @param metadata
438
+ * A TCP protocol metadata object from an established connection
439
+ * (e.g. obtained via nw_connection_access_established_protocol_metadata).
440
+ *
441
+ * @param max_pacing_rate
442
+ * Maximum pacing rate in bytes per second. 0 or UINT64_MAX disables
443
+ * pacing on this connection.
444
+ *
445
+ * @result
446
+ * Returns 0 on success, or a POSIX errno value on failure (e.g. EINVAL
447
+ * if metadata is not a TCP metadata object, or the underlying socket
448
+ * error).
449
+ */
450
+ NW_EXPORT API_AVAILABLE(anyappleos(27.0))
451
+ int
452
+ nw_tcp_set_max_pacing_rate(nw_protocol_metadata_t metadata,
453
+ uint64_t max_pacing_rate);
454
+
455
+ NW_ASSUME_NONNULL_END
456
+
457
+ __END_DECLS
458
+
459
+ #endif // __NW_TCP_OPTIONS_H__
@@ -0,0 +1,115 @@
1
+ //
2
+ // tls_options.h
3
+ // Network
4
+ //
5
+ // Copyright (c) 2017-2019 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef __NW_TLS_OPTIONS_H__
9
+ #define __NW_TLS_OPTIONS_H__
10
+
11
+ #ifndef __NW_INDIRECT__
12
+ #warning "Please include <Network/Network.h> instead of this file directly."
13
+ #endif // __NW_INDIRECT__
14
+
15
+ #include <Network/protocol_options.h>
16
+
17
+ #include <Security/Security.h>
18
+ #include <uuid/uuid.h>
19
+
20
+
21
+ __BEGIN_DECLS
22
+
23
+ NW_ASSUME_NONNULL_BEGIN
24
+
25
+ /*!
26
+ * @function nw_protocol_copy_tls_definition
27
+ *
28
+ * @abstract
29
+ * Access the definition of the default system protocol implementation
30
+ * of TLS (Transport Layer Security). This protocol can be used
31
+ * as part of a connection's protocol stack as an application protocol.
32
+ *
33
+ * @result
34
+ * Returns a retained protocol definition object.
35
+ */
36
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
37
+ NW_RETURNS_RETAINED nw_protocol_definition_t
38
+ nw_protocol_copy_tls_definition(void);
39
+
40
+ #pragma mark - Options
41
+
42
+ /*!
43
+ * @function nw_tls_create_options
44
+ *
45
+ * @abstract
46
+ * Create an instance of TLS protocol options. This object can be added
47
+ * to an nw_protocol_stack_t to be used in an nw_connection_t or
48
+ * an nw_listener_t.
49
+ *
50
+ * @result
51
+ * Returns a retained protocol options object.
52
+ */
53
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
54
+ NW_RETURNS_RETAINED nw_protocol_options_t
55
+ nw_tls_create_options(void);
56
+
57
+ /*!
58
+ * @function nw_tls_copy_sec_protocol_options
59
+ *
60
+ * @abstract
61
+ * Access the sec_protocol_options_t for a given network protocol
62
+ * options instance. See <Security/SecProtocolOptions.h> for functions
63
+ * to further configure security options.
64
+ *
65
+ * @param options
66
+ * An nw_protocol_options_t that has been created for TLS.
67
+ *
68
+ * @result
69
+ * Returns a retained sec_protocol_options_t object.
70
+ */
71
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
72
+ NW_RETURNS_RETAINED sec_protocol_options_t
73
+ nw_tls_copy_sec_protocol_options(nw_protocol_options_t options);
74
+
75
+ #pragma mark - Metadata
76
+
77
+ /*!
78
+ * @function nw_protocol_metadata_is_tls
79
+ *
80
+ * @abstract
81
+ * Checks if a protocol metadata object is compatible with the
82
+ * accessors defined in this file for the default system
83
+ * implementation of TLS.
84
+ *
85
+ * @result
86
+ * Returns true if the metadata is for the default system TLS,
87
+ * false otherwise.
88
+ */
89
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
90
+ bool
91
+ nw_protocol_metadata_is_tls(nw_protocol_metadata_t metadata);
92
+
93
+ /*!
94
+ * @function nw_tls_copy_sec_protocol_metadata
95
+ *
96
+ * @abstract
97
+ * Access the sec_protocol_metadata_t for a given network protocol
98
+ * metadata instance. See <Security/SecProtocolMetadata.h> for functions
99
+ * to access security properties.
100
+ *
101
+ * @param metadata
102
+ * An nw_protocol_metadata_t for the TLS protocol.
103
+ *
104
+ * @result
105
+ * Returns a retained sec_protocol_metadata_t object.
106
+ */
107
+ API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
108
+ NW_RETURNS_RETAINED sec_protocol_metadata_t
109
+ nw_tls_copy_sec_protocol_metadata(nw_protocol_metadata_t metadata);
110
+
111
+ NW_ASSUME_NONNULL_END
112
+
113
+ __END_DECLS
114
+
115
+ #endif // __NW_TLS_OPTIONS_H__