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,932 @@
1
+ //
2
+ // connection_report.h
3
+ // Network
4
+ //
5
+ // Copyright (c) 2018-2020 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef __NW_CONNECTION_REPORT_H__
9
+ #define __NW_CONNECTION_REPORT_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/connection.h>
16
+ #include <Network/interface.h>
17
+
18
+ NW_ASSUME_NONNULL_BEGIN
19
+
20
+ __BEGIN_DECLS
21
+
22
+ #pragma mark - Establishment Report
23
+
24
+ /*!
25
+ * @typedef nw_establishment_report_t
26
+ * @abstract
27
+ * An Establishment Report contains information about how an nw_connection_t
28
+ * became established. This is intended to be used for analysis of performance
29
+ * after connection establishment. The report cannot be gathered until a
30
+ * connection is in the "ready" state.
31
+ *
32
+ * This type supports ARC and the -[description] method. In non-ARC files, use
33
+ * nw_retain() and nw_release() to retain and release the object.
34
+ */
35
+ #ifndef NW_ESTABLISHMENT_REPORT_IMPL
36
+ NW_OBJECT_DECL(nw_establishment_report);
37
+ #endif // NW_ESTABLISHMENT_REPORT_IMPL
38
+
39
+ #ifdef __BLOCKS__
40
+
41
+ typedef void (^nw_establishment_report_access_block_t)(_Nullable nw_establishment_report_t report);
42
+
43
+ /*!
44
+ * @function nw_connection_access_establishment_report
45
+ *
46
+ * @abstract
47
+ * Access the establishment report for a connection. The report will be
48
+ * NULL until the connection is in the "ready" state.
49
+ *
50
+ * The callback block will be invoked exactly once on the provided queue.
51
+ *
52
+ * @param connection
53
+ * An established connection.
54
+ *
55
+ * @param queue
56
+ * The dispatch queue on which to call the access_block.
57
+ *
58
+ * @param access_block
59
+ * A block to invoke with the establishment report, which may be NULL if the
60
+ * connection not ready.
61
+ */
62
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
63
+ void
64
+ nw_connection_access_establishment_report(nw_connection_t connection,
65
+ dispatch_queue_t queue,
66
+ nw_establishment_report_access_block_t access_block);
67
+
68
+ #endif // __BLOCKS__
69
+
70
+ /*!
71
+ * @function nw_establishment_report_get_duration_milliseconds
72
+ *
73
+ * @abstract
74
+ * Retrieve the duration of the connection's establishment. This is
75
+ * the total time in milliseconds from when the connection attempt began
76
+ * until the connection becomes ready, including resolution, proxy
77
+ * evaluation, and protocol handshakes.
78
+ *
79
+ * @param report
80
+ * An establishment report.
81
+ *
82
+ * @result
83
+ * Returns the number of milliseconds the connection took to establish.
84
+ */
85
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
86
+ uint64_t
87
+ nw_establishment_report_get_duration_milliseconds(nw_establishment_report_t report);
88
+
89
+ /*!
90
+ * @function nw_establishment_report_get_attempt_started_after_milliseconds
91
+ *
92
+ * @abstract
93
+ * Retrieve the delay from calling start() after which the successful connection
94
+ * attempt began. For connections that succeed on the first attempt, this value
95
+ * will be 0. For connections that move into the "waiting" state, this
96
+ * value will be greater than 0.
97
+ *
98
+ * @param report
99
+ * An establishment report.
100
+ *
101
+ * @result
102
+ * Returns the number of milliseconds from connection start to the beginning
103
+ * of the successful connection attempt.
104
+ */
105
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
106
+ uint64_t
107
+ nw_establishment_report_get_attempt_started_after_milliseconds(nw_establishment_report_t report);
108
+
109
+ /*!
110
+ * @function nw_establishment_report_get_previous_attempt_count
111
+ *
112
+ * @abstract
113
+ * Retrieve the number of connection attempts made before the successful
114
+ * attempt. For connections that succeed on the first attempt, this value
115
+ * will be 0. For connections that move into the "waiting" state, this
116
+ * value will be greater than 0.
117
+ *
118
+ * @param report
119
+ * An establishment report.
120
+ *
121
+ * @result
122
+ * Returns the number of connection attempts made before the successful attempt.
123
+ */
124
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
125
+ uint32_t
126
+ nw_establishment_report_get_previous_attempt_count(nw_establishment_report_t report);
127
+
128
+ /*!
129
+ * @function nw_establishment_report_get_used_proxy
130
+ *
131
+ * @abstract
132
+ * Check if the connection used a proxy during establishment.
133
+ *
134
+ * @param report
135
+ * An establishment report.
136
+ *
137
+ * @result
138
+ * Returns true if the connection used a proxy, false otherwise.
139
+ */
140
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
141
+ bool
142
+ nw_establishment_report_get_used_proxy(nw_establishment_report_t report);
143
+
144
+ /*!
145
+ * @function nw_establishment_report_get_proxy_configured
146
+ *
147
+ * @abstract
148
+ * Check if a proxy configuration applied to the connection,
149
+ * even if the connection did not end up using a proxy for the
150
+ * successful attempt.
151
+ *
152
+ * @param report
153
+ * An establishment report.
154
+ *
155
+ * @result
156
+ * Returns true if a proxy configuration applied to the connection,
157
+ * false otherwise.
158
+ */
159
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
160
+ bool
161
+ nw_establishment_report_get_proxy_configured(nw_establishment_report_t report);
162
+
163
+ /*!
164
+ * @function nw_establishment_report_copy_proxy_endpoint
165
+ *
166
+ * @abstract
167
+ * Access the endpoint of the proxy used by a connection, if applicable.
168
+ *
169
+ * @param report
170
+ * An establishment report.
171
+ *
172
+ * @result
173
+ * Returns an allocated endpoint object if a proxy was used by the connection,
174
+ * or NULL if no proxy was used.
175
+ * Callers are responsible for deallocating using nw_release(obj) or [obj release].
176
+ * These objects support ARC.
177
+ */
178
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
179
+ NW_RETURNS_RETAINED _Nullable nw_endpoint_t
180
+ nw_establishment_report_copy_proxy_endpoint(nw_establishment_report_t report);
181
+
182
+ /*!
183
+ * @typedef nw_resolution_report_t
184
+ * @abstract
185
+ * A Resolution Report contains information about one step
186
+ * of endpoint resolution performed during connection establishment.
187
+ *
188
+ * This type supports ARC and the -[description] method. In non-ARC files, use
189
+ * nw_retain() and nw_release() to retain and release the object.
190
+ */
191
+ #ifndef NW_RESOLUTION_REPORT_IMPL
192
+ NW_OBJECT_DECL(nw_resolution_report);
193
+ #endif // NW_RESOLUTION_REPORT_IMPL
194
+
195
+ /*!
196
+ * @typedef nw_report_resolution_source_t
197
+ * @abstract
198
+ * The source of a resolution indicates if the set of endpoints was resolved
199
+ * locally using a cache, or sent a query over the network.
200
+ */
201
+ typedef enum {
202
+ /*! @const nw_report_resolution_source_query A query was sent over the network */
203
+ nw_report_resolution_source_query = 1,
204
+ /*! @const nw_report_resolution_source_cache The local cache was used */
205
+ nw_report_resolution_source_cache = 2,
206
+ /*! @const nw_report_resolution_source_expired_cache An expired entry in the local cache was used */
207
+ nw_report_resolution_source_expired_cache = 3,
208
+ } nw_report_resolution_source_t;
209
+
210
+ /*!
211
+ * @function nw_resolution_report_get_source
212
+ *
213
+ * @abstract
214
+ * Check the source of a resolution, such as query or cache.
215
+ *
216
+ * @param resolution_report
217
+ * A resolution report.
218
+ *
219
+ * @result
220
+ * The source of the resolution (query or cache).
221
+ */
222
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
223
+ nw_report_resolution_source_t
224
+ nw_resolution_report_get_source(nw_resolution_report_t resolution_report);
225
+
226
+ /*!
227
+ * @function nw_resolution_report_get_milliseconds
228
+ *
229
+ * @abstract
230
+ * Get the number of milliseconds spent on this resolution step.
231
+ *
232
+ * @param resolution_report
233
+ * A resolution report.
234
+ *
235
+ * @result
236
+ * The number of milliseconds spent on this resolution step.
237
+ */
238
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
239
+ uint64_t
240
+ nw_resolution_report_get_milliseconds(nw_resolution_report_t resolution_report);
241
+
242
+ /*!
243
+ * @function nw_resolution_report_get_endpoint_count
244
+ *
245
+ * @abstract
246
+ * Get the number of resolved endpoints discovered by the resolution step.
247
+ *
248
+ * @param resolution_report
249
+ * A resolution report.
250
+ *
251
+ * @result
252
+ * The number of resolved endpoints discovered by the resolution step.
253
+ */
254
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
255
+ uint32_t
256
+ nw_resolution_report_get_endpoint_count(nw_resolution_report_t resolution_report);
257
+
258
+ /*!
259
+ * @function nw_resolution_report_copy_successful_endpoint
260
+ *
261
+ * @abstract
262
+ * Copy the resolved endpoint that led to a successful connection.
263
+ *
264
+ * @param resolution_report
265
+ * A resolution report.
266
+ *
267
+ * @result
268
+ * The resolved endpoint that led to a successful connection.
269
+ */
270
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
271
+ NW_RETURNS_RETAINED nw_endpoint_t
272
+ nw_resolution_report_copy_successful_endpoint(nw_resolution_report_t resolution_report);
273
+
274
+ /*!
275
+ * @function nw_resolution_report_copy_preferred_endpoint
276
+ *
277
+ * @abstract
278
+ * Copy first resolved endpoint attempted, which may be the same as the successful endpoint.
279
+ *
280
+ * @param resolution_report
281
+ * A resolution report.
282
+ *
283
+ * @result
284
+ * The first resolved endpoint attempted.
285
+ */
286
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
287
+ NW_RETURNS_RETAINED nw_endpoint_t
288
+ nw_resolution_report_copy_preferred_endpoint(nw_resolution_report_t resolution_report);
289
+
290
+ /*!
291
+ * @typedef nw_report_resolution_protocol_t
292
+ * @abstract
293
+ * The protocol used for endpoint resolution.
294
+ */
295
+ typedef enum {
296
+ /*! @const nw_report_resolution_protocol_unknown The protocol used is not known, or not applicable */
297
+ nw_report_resolution_protocol_unknown = 0,
298
+ /*! @const nw_report_resolution_protocol_udp Resolution used DNS over UDP */
299
+ nw_report_resolution_protocol_udp = 1,
300
+ /*! @const nw_report_resolution_protocol_tcp Resolution used DNS over TCP */
301
+ nw_report_resolution_protocol_tcp = 2,
302
+ /*! @const nw_report_resolution_protocol_tls Resolution used DNS over TLS */
303
+ nw_report_resolution_protocol_tls = 3,
304
+ /*! @const nw_report_resolution_protocol_https Resolution used DNS over HTTPS */
305
+ nw_report_resolution_protocol_https = 4,
306
+ } nw_report_resolution_protocol_t;
307
+
308
+ /*!
309
+ * @function nw_resolution_report_get_protocol
310
+ *
311
+ * @abstract
312
+ * Check the protocol used for endpoint resolution.
313
+ *
314
+ * @param resolution_report
315
+ * A resolution report.
316
+ *
317
+ * @result
318
+ * The protocol used for endpoint resolution.
319
+ */
320
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
321
+ nw_report_resolution_protocol_t
322
+ nw_resolution_report_get_protocol(nw_resolution_report_t resolution_report);
323
+
324
+ #ifdef __BLOCKS__
325
+
326
+ typedef bool (^nw_report_resolution_enumerator_t)(nw_report_resolution_source_t source,
327
+ uint64_t milliseconds,
328
+ uint32_t endpoint_count,
329
+ nw_endpoint_t successful_endpoint,
330
+ nw_endpoint_t preferred_endpoint);
331
+
332
+ /*!
333
+ * @function nw_establishment_report_enumerate_resolutions
334
+ *
335
+ * @abstract
336
+ * Enumerate the steps of connection establishment that involved endpoint
337
+ * resolution, such as DNS hostname resolution and Bonjour service resolution.
338
+ * The provided block will be called inline zero or more times.
339
+ *
340
+ * @param report
341
+ * An establishment report.
342
+ *
343
+ * @param enumerate_block
344
+ * A block to be invoked zero or more times, once for each step of resolution
345
+ * used during connection establishment.
346
+ *
347
+ * The values passed to the enumerator are:
348
+ * - source: The source of the resolution (query or cache).
349
+ * - milliseconds: The number of milliseconds spent on this resolution step.
350
+ * - endpoint_count: The number of resolved endpoints discovered by the resolution step.
351
+ * - successful_endpoint: The resolved endpoint that led to a successful connection.
352
+ * - preferred_endpoint: The first resolved endpoint attempted, which may be the same as the successful_endpoint.
353
+ *
354
+ * Returning true from the block indicates that the enumeration should continue.
355
+ * Returning false indicates that the enumeration should stop.
356
+ */
357
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
358
+ void
359
+ nw_establishment_report_enumerate_resolutions(nw_establishment_report_t report,
360
+ NW_NOESCAPE nw_report_resolution_enumerator_t enumerate_block);
361
+
362
+ typedef bool (^nw_report_resolution_report_enumerator_t)(nw_resolution_report_t resolution_report);
363
+
364
+ /*!
365
+ * @function nw_establishment_report_enumerate_resolution_reports
366
+ *
367
+ * @abstract
368
+ * Enumerate the steps of connection establishment that involved endpoint
369
+ * resolution, such as DNS hostname resolution and Bonjour service resolution.
370
+ * This variant provides resolution report objects, which allow more detailed
371
+ * access to information.
372
+ *
373
+ * The provided block will be called inline zero or more times.
374
+ *
375
+ * @param report
376
+ * An establishment report.
377
+ *
378
+ * @param enumerate_block
379
+ * A block to be invoked zero or more times, once for each step of resolution
380
+ * used during connection establishment. Each block contains a nw_resolution_report_t.
381
+ *
382
+ * Returning true from the block indicates that the enumeration should continue.
383
+ * Returning false indicates that the enumeration should stop.
384
+ */
385
+ API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
386
+ void
387
+ nw_establishment_report_enumerate_resolution_reports(nw_establishment_report_t report,
388
+ NW_NOESCAPE nw_report_resolution_report_enumerator_t enumerate_block);
389
+
390
+ typedef bool (^nw_report_protocol_enumerator_t)(nw_protocol_definition_t protocol,
391
+ uint64_t handshake_milliseconds,
392
+ uint64_t handshake_rtt_milliseconds);
393
+
394
+ /*!
395
+ * @function nw_establishment_report_enumerate_protocols
396
+ *
397
+ * @abstract
398
+ * Enumerate the protocols used in the established connection.
399
+ * The provided block will be called inline zero or more times.
400
+ *
401
+ * @param report
402
+ * An establishment report.
403
+ *
404
+ * @param enumerate_block
405
+ * A block to be invoked zero or more times, once for each protocol
406
+ * used in the established connection.
407
+ *
408
+ * The values passed to the enumerator are:
409
+ * - protocol: The protocol definition.
410
+ * - handshake_milliseconds: The number of milliseconds spent on the protocol's handshake.
411
+ * - handshake_rtt_milliseconds: The round trip time in milliseconds measured by the protocol's handshake.
412
+ *
413
+ * Returning true from the block indicates that the enumeration should continue.
414
+ * Returning false indicates that the enumeration should stop.
415
+ */
416
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
417
+ void
418
+ nw_establishment_report_enumerate_protocols(nw_establishment_report_t report,
419
+ NW_NOESCAPE nw_report_protocol_enumerator_t enumerate_block);
420
+
421
+ #endif // __BLOCKS__
422
+
423
+ #pragma mark - Data Transfer Report
424
+
425
+ /*!
426
+ * @typedef nw_data_transfer_report_t
427
+ * @abstract
428
+ * A Data Transfer Report contains performance information about data
429
+ * transferred on an nw_connection_t for certain span of time. Multiple reports
430
+ * can be retrieved from a single connection, starting and ending at different times.
431
+ * This allows throughput to be measured based on how an application is using
432
+ * a connection. A report may be created prior to a connection moving into
433
+ * the "ready" state, but measurements will not be collected until after the
434
+ * connection is ready.
435
+ *
436
+ * This type supports ARC and the -[description] method. In non-ARC files, use
437
+ * nw_retain() and nw_release() to retain and release the object.
438
+ */
439
+ #ifndef NW_DATA_TRANSFER_REPORT_IMPL
440
+ NW_OBJECT_DECL(nw_data_transfer_report);
441
+ #endif // NW_DATA_TRANSFER_REPORT_IMPL
442
+
443
+ /*!
444
+ * @function nw_connection_create_new_data_transfer_report
445
+ *
446
+ * @abstract
447
+ * Create a new data transfer report on a connection. Multiple
448
+ * reports may be created for a single connection. The report begins
449
+ * capturing data when the connection becomes ready, or when the
450
+ * report is created (whichever occurs last).
451
+ *
452
+ * Call nw_data_transfer_report_collect() to complete collection of
453
+ * report, after which point the details of the report will be available.
454
+ *
455
+ * @param connection
456
+ * A connection object, in or before the ready state.
457
+ *
458
+ * @result
459
+ * Returns an allocated nw_data_transfer_report_t object on success.
460
+ * Callers are responsible for deallocating using nw_release(obj) or [obj release].
461
+ * These objects support ARC.
462
+ * Returns NULL on failure. Fails due to invalid parameters.
463
+ */
464
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
465
+ NW_RETURNS_RETAINED nw_data_transfer_report_t
466
+ nw_connection_create_new_data_transfer_report(nw_connection_t connection);
467
+
468
+ /*!
469
+ * @typedef nw_data_transfer_report_state_t
470
+ * @abstract
471
+ * The state of a Data Transfer Report indicates whether or not the contents
472
+ * have been collected, and are ready to be accessed.
473
+ */
474
+ typedef enum {
475
+ /*! @const nw_data_transfer_report_state_collecting The report is outstanding; values cannot be accessed. */
476
+ nw_data_transfer_report_state_collecting = 1,
477
+ /*! @const nw_data_transfer_report_state_collected The report is complete; values can now be accessed. */
478
+ nw_data_transfer_report_state_collected = 2,
479
+ } nw_data_transfer_report_state_t;
480
+
481
+ /*!
482
+ * @function nw_data_transfer_report_get_state
483
+ *
484
+ * @abstract
485
+ * Access the state of a data transfer report. Once a report
486
+ * is "collected", individual fields may be read.
487
+ *
488
+ * @param report
489
+ * A data transfer report to check.
490
+ *
491
+ * @result
492
+ * Returns the current state of the data transfer report.
493
+ */
494
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
495
+ nw_data_transfer_report_state_t
496
+ nw_data_transfer_report_get_state(nw_data_transfer_report_t report);
497
+
498
+ #ifdef __BLOCKS__
499
+
500
+ typedef void (^nw_data_transfer_report_collect_block_t)(nw_data_transfer_report_t report);
501
+
502
+ /*!
503
+ * @function nw_data_transfer_report_collect
504
+ *
505
+ * @abstract
506
+ * Mark a data transfer report as complete, and request collection of
507
+ * values. Once the report has been collected, the callback block
508
+ * will be invoked exactly once on the provided dispatch queue.
509
+ *
510
+ * If a connection is cancelled or fails prior to the report being collected,
511
+ * the report will automatically be collected. Calling
512
+ * nw_data_transfer_report_collect() will be redundant but not harmful.
513
+ *
514
+ * @param report
515
+ * A data transfer report to check.
516
+ *
517
+ * @param queue
518
+ * The dispatch queue on which to call the collect_block.
519
+ *
520
+ * @param collect_block
521
+ * A block to invoke once the report has been collected.
522
+ */
523
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
524
+ void
525
+ nw_data_transfer_report_collect(nw_data_transfer_report_t report,
526
+ dispatch_queue_t queue,
527
+ nw_data_transfer_report_collect_block_t collect_block);
528
+
529
+ #endif // __BLOCKS__
530
+
531
+ /*!
532
+ * @const NW_ALL_PATHS
533
+ * @discussion Pass NW_ALL_PATHS to data transfer report accessors to sum
534
+ * values across paths where applicable. For values that cannot
535
+ * sum, the value of the primary path is used.
536
+ */
537
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
538
+ extern const uint32_t _nw_data_transfer_report_all_paths;
539
+ #define NW_ALL_PATHS (_nw_data_transfer_report_all_paths)
540
+
541
+ /*!
542
+ * @function nw_data_transfer_report_get_duration_milliseconds
543
+ *
544
+ * @abstract
545
+ * Retrieve the duration of the data transfer report. This is a length
546
+ * of time in milliseconds which can be used to calculate throughput
547
+ * when compared to application and transport byte counts.
548
+ *
549
+ * The start time is calculated from when the report was created, or the connection
550
+ * became ready if the connection was not ready when the report was created.
551
+ * The duration ends when the report is collected, or the connection fails
552
+ * or is cancelled.
553
+ *
554
+ * @param report
555
+ * A data transfer report in the "collected" state.
556
+ *
557
+ * @result
558
+ * Returns the duration of the data transport report in milliseconds, or 0
559
+ * if the report is not in the "collected" state.
560
+ */
561
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
562
+ uint64_t
563
+ nw_data_transfer_report_get_duration_milliseconds(nw_data_transfer_report_t report);
564
+
565
+ /*!
566
+ * @function nw_data_transfer_report_get_path_count
567
+ *
568
+ * @abstract
569
+ * Retrieve the number of paths used by the connection for the
570
+ * duration of the report. Any value greater than or equal to 0 and
571
+ * less than this count may be used as a "path_index" for retrieving
572
+ * specific details from the report.
573
+ *
574
+ * @param report
575
+ * A data transfer report in the "collected" state.
576
+ *
577
+ * @result
578
+ * Returns the number of paths used by the connection, which
579
+ * limits the value of the "path_index" parameter used in other report
580
+ * functions. Returns 0 if the report is not in the "collected" state.
581
+ */
582
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
583
+ uint32_t
584
+ nw_data_transfer_report_get_path_count(nw_data_transfer_report_t report);
585
+
586
+ /*!
587
+ * @function nw_data_transfer_report_get_received_ip_packet_count
588
+ *
589
+ * @abstract
590
+ * Retrieve the number of IP packets received on a given path for the
591
+ * duration of the report.
592
+ *
593
+ * @param report
594
+ * A data transfer report in the "collected" state.
595
+ *
596
+ * @param path_index
597
+ * The index for the path over which data is transferred.
598
+ * Passing NW_ALL_PATHS for this function returns
599
+ * the sum of all paths.
600
+ *
601
+ * @result
602
+ * Returns the number of IP packets received, or 0
603
+ * if the report is not in the "collected" state.
604
+ */
605
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
606
+ uint64_t
607
+ nw_data_transfer_report_get_received_ip_packet_count(nw_data_transfer_report_t report,
608
+ uint32_t path_index);
609
+
610
+ /*!
611
+ * @function nw_data_transfer_report_get_sent_ip_packet_count
612
+ *
613
+ * @abstract
614
+ * Retrieve the number of IP packets sent on a given path for the
615
+ * duration of the report.
616
+ *
617
+ * @param report
618
+ * A data transfer report in the "collected" state.
619
+ *
620
+ * @param path_index
621
+ * The index for the path over which data is transferred.
622
+ * Passing NW_ALL_PATHS for this function returns
623
+ * the sum of all paths.
624
+ *
625
+ * @result
626
+ * Returns the number of IP packets sent, or 0 if the report is not
627
+ * in the "collected" state.
628
+ */
629
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
630
+ uint64_t
631
+ nw_data_transfer_report_get_sent_ip_packet_count(nw_data_transfer_report_t report,
632
+ uint32_t path_index);
633
+
634
+ /*!
635
+ * @function nw_data_transfer_report_get_received_transport_byte_count
636
+ *
637
+ * @abstract
638
+ * Retrieve the number of transport protocol bytes (such as TCP stream bytes)
639
+ * received on a given path for the duration of the report.
640
+ *
641
+ * @param report
642
+ * A data transfer report in the "collected" state.
643
+ *
644
+ * @param path_index
645
+ * The index for the path over which data is transferred.
646
+ * Passing NW_ALL_PATHS for this function returns
647
+ * the sum of all paths.
648
+ *
649
+ * @result
650
+ * Returns the number of transport protocol bytes received, or 0 if the
651
+ * report is not in the "collected" state.
652
+ */
653
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
654
+ uint64_t
655
+ nw_data_transfer_report_get_received_transport_byte_count(nw_data_transfer_report_t report,
656
+ uint32_t path_index);
657
+
658
+ /*!
659
+ * @function nw_data_transfer_report_get_received_transport_duplicate_byte_count
660
+ *
661
+ * @abstract
662
+ * Retrieve the number of duplicate transport protocol bytes (such as
663
+ * duplicate TCP bytes) received on a given path for the duration of the report.
664
+ *
665
+ * @param report
666
+ * A data transfer report in the "collected" state.
667
+ *
668
+ * @param path_index
669
+ * The index for the path over which data is transferred.
670
+ * Passing NW_ALL_PATHS for this function returns
671
+ * the sum of all paths.
672
+ *
673
+ * @result
674
+ * Returns the number of duplicate transport protocol bytes received, or 0
675
+ * if the report is not in the "collected" state.
676
+ */
677
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
678
+ uint64_t
679
+ nw_data_transfer_report_get_received_transport_duplicate_byte_count(nw_data_transfer_report_t report,
680
+ uint32_t path_index);
681
+
682
+ /*!
683
+ * @function nw_data_transfer_report_get_received_transport_out_of_order_byte_count
684
+ *
685
+ * @abstract
686
+ * Retrieve the number of out-of-order transport protocol bytes (such as
687
+ * out-of-order TCP bytes) received on a given path for the duration of the report.
688
+ *
689
+ * @param report
690
+ * A data transfer report in the "collected" state.
691
+ *
692
+ * @param path_index
693
+ * The index for the path over which data is transferred.
694
+ * Passing NW_ALL_PATHS for this function returns
695
+ * the sum of all paths.
696
+ *
697
+ * @result
698
+ * Returns the number of out-of-order transport protocol bytes received, or 0
699
+ * if the report is not in the "collected" state.
700
+ */
701
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
702
+ uint64_t
703
+ nw_data_transfer_report_get_received_transport_out_of_order_byte_count(nw_data_transfer_report_t report,
704
+ uint32_t path_index);
705
+
706
+ /*!
707
+ * @function nw_data_transfer_report_get_sent_transport_byte_count
708
+ *
709
+ * @abstract
710
+ * Retrieve the number of transport protocol bytes (such as TCP stream bytes)
711
+ * sent on a given path for the duration of the report.
712
+ *
713
+ * @param report
714
+ * A data transfer report in the "collected" state.
715
+ *
716
+ * @param path_index
717
+ * The index for the path over which data is transferred.
718
+ * Passing NW_ALL_PATHS for this function returns
719
+ * the sum of all paths.
720
+ *
721
+ * @result
722
+ * Returns the number of transport protocol bytes sent, or 0
723
+ * if the report is not in the "collected" state.
724
+ */
725
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
726
+ uint64_t
727
+ nw_data_transfer_report_get_sent_transport_byte_count(nw_data_transfer_report_t report,
728
+ uint32_t path_index);
729
+
730
+ /*!
731
+ * @function nw_data_transfer_report_get_sent_transport_retransmitted_byte_count
732
+ *
733
+ * @abstract
734
+ * Retrieve the number of retransmitted transport protocol bytes (such as
735
+ * retransmitted TCP bytes) sent on a given path for the duration of the report.
736
+ *
737
+ * @param report
738
+ * A data transfer report in the "collected" state.
739
+ *
740
+ * @param path_index
741
+ * The index for the path over which data is transferred.
742
+ * Passing NW_ALL_PATHS for this function returns
743
+ * the sum of all paths.
744
+ *
745
+ * @result
746
+ * Returns the number of retransmitted transport protocol bytes sent, or 0
747
+ * if the report is not in the "collected" state.
748
+ */
749
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
750
+ uint64_t
751
+ nw_data_transfer_report_get_sent_transport_retransmitted_byte_count(nw_data_transfer_report_t report,
752
+ uint32_t path_index);
753
+
754
+ /*!
755
+ * @function nw_data_transfer_report_get_transport_smoothed_rtt_milliseconds
756
+ *
757
+ * @abstract
758
+ * Retrieve the smoothed average for the transport protocol's round trip time
759
+ * (RTT) on a given path for the duration of the report, measured in milliseconds.
760
+ *
761
+ * @param report
762
+ * A data transfer report in the "collected" state.
763
+ *
764
+ * @param path_index
765
+ * The index for the path over which data is transferred.
766
+ * For non-multipath connections, pass 0 as the path index to access
767
+ * the single path. Passing NW_ALL_PATHS for this function is
768
+ * equivalent to passing 0.
769
+ *
770
+ * @result
771
+ * Returns the smoothed RTT as measured by the transport protocol, or 0
772
+ * if the report is not in the "collected" state.
773
+ */
774
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
775
+ uint64_t
776
+ nw_data_transfer_report_get_transport_smoothed_rtt_milliseconds(nw_data_transfer_report_t report,
777
+ uint32_t path_index);
778
+
779
+ /*!
780
+ * @function nw_data_transfer_report_get_transport_minimum_rtt_milliseconds
781
+ *
782
+ * @abstract
783
+ * Retrieve the minimum (best) round trip time (RTT) on a given path for
784
+ * the duration of the report, measured in milliseconds.
785
+ *
786
+ * @param report
787
+ * A data transfer report in the "collected" state.
788
+ *
789
+ * @param path_index
790
+ * The index for the path over which data is transferred.
791
+ * For non-multipath connections, pass 0 as the path index to access
792
+ * the single path. Passing NW_ALL_PATHS for this function is
793
+ * equivalent to passing 0.
794
+ *
795
+ * @result
796
+ * Returns the minimum RTT as measured by the transport protocol, or 0
797
+ * if the report is not in the "collected" state.
798
+ */
799
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
800
+ uint64_t
801
+ nw_data_transfer_report_get_transport_minimum_rtt_milliseconds(nw_data_transfer_report_t report,
802
+ uint32_t path_index);
803
+
804
+ /*!
805
+ * @function nw_data_transfer_report_get_transport_rtt_variance
806
+ *
807
+ * @abstract
808
+ * Retrieve the variance of the round trip time (RTT) on a given path for
809
+ * the duration of the report.
810
+ *
811
+ * @param report
812
+ * A data transfer report in the "collected" state.
813
+ *
814
+ * @param path_index
815
+ * The index for the path over which data is transferred.
816
+ * For non-multipath connections, pass 0 as the path index to access
817
+ * the single path. Passing NW_ALL_PATHS for this function is
818
+ * equivalent to passing 0.
819
+ *
820
+ * @result
821
+ * Returns the RTT variance as measured by the transport protocol, or 0
822
+ * if the report is not in the "collected" state.
823
+ */
824
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
825
+ uint64_t
826
+ nw_data_transfer_report_get_transport_rtt_variance(nw_data_transfer_report_t report,
827
+ uint32_t path_index);
828
+
829
+ /*!
830
+ * @function nw_data_transfer_report_get_received_application_byte_count
831
+ *
832
+ * @abstract
833
+ * Retrieve the number of application bytes received on a given
834
+ * path for the duration of the report.
835
+ *
836
+ * @param report
837
+ * A data transfer report in the "collected" state.
838
+ *
839
+ * @param path_index
840
+ * The index for the path over which data is transferred.
841
+ * Passing NW_ALL_PATHS for this function returns
842
+ * the sum of all paths.
843
+ *
844
+ * @result
845
+ * Returns the number of application bytes received, or 0
846
+ * if the report is not in the "collected" state.
847
+ */
848
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
849
+ uint64_t
850
+ nw_data_transfer_report_get_received_application_byte_count(nw_data_transfer_report_t report,
851
+ uint32_t path_index);
852
+
853
+ /*!
854
+ * @function nw_data_transfer_report_get_sent_application_byte_count
855
+ *
856
+ * @abstract
857
+ * Retrieve the number of application bytes sent on a given
858
+ * path for the duration of the report.
859
+ *
860
+ * @param report
861
+ * A data transfer report in the "collected" state.
862
+ *
863
+ * @param path_index
864
+ * The index for the path over which data is transferred.
865
+ * Passing NW_ALL_PATHS for this function returns
866
+ * the sum of all paths.
867
+ *
868
+ * @result
869
+ * Returns the number of application bytes sent, or 0
870
+ * if the report is not in the "collected" state.
871
+ */
872
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
873
+ uint64_t
874
+ nw_data_transfer_report_get_sent_application_byte_count(nw_data_transfer_report_t report,
875
+ uint32_t path_index);
876
+
877
+ /*!
878
+ * @function nw_data_transfer_report_copy_path_interface
879
+ *
880
+ * @abstract
881
+ * Retrieve the interface used for data transfer for a given
882
+ * path used by a connection.
883
+ *
884
+ * @param report
885
+ * A data transfer report in the "collected" state.
886
+ *
887
+ * @param path_index
888
+ * The index for the path over which data is transferred.
889
+ * Passing NW_ALL_PATHS for this function is
890
+ * equivalent to passing 0.
891
+ *
892
+ * @result
893
+ * Returns a retained nw_interface_t object on success.
894
+ * Callers are responsible for deallocating using nw_release(obj) or [obj release].
895
+ * These objects support ARC.
896
+ * Returns NULL on failure. Fails if the report is not yet collected.
897
+ */
898
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
899
+ NW_RETURNS_RETAINED nw_interface_t
900
+ nw_data_transfer_report_copy_path_interface(nw_data_transfer_report_t report,
901
+ uint32_t path_index);
902
+
903
+ /*!
904
+ * @function nw_data_transfer_report_get_path_radio_type
905
+ *
906
+ * @abstract
907
+ * Retrieve the radio type used for data transfer for a given
908
+ * path used by a connection.
909
+ *
910
+ * @param report
911
+ * A data transfer report in the "collected" state.
912
+ *
913
+ * @param path_index
914
+ * The index for the path over which data is transferred.
915
+ * Passing NW_ALL_PATHS for this function is
916
+ * equivalent to passing 0.
917
+ *
918
+ * @result
919
+ * Returns the radio type used for the specified path.
920
+ * Returns nw_interface_radio_type_unknown on failure.
921
+ * Fails if the report is not yet collected.
922
+ */
923
+ API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
924
+ nw_interface_radio_type_t
925
+ nw_data_transfer_report_get_path_radio_type(nw_data_transfer_report_t report,
926
+ uint32_t path_index);
927
+
928
+ __END_DECLS
929
+
930
+ NW_ASSUME_NONNULL_END
931
+
932
+ #endif /* defined(__NW_CONNECTION_REPORT_H__) */