peachsim 0.1.1728 → 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.
- package/README.md +4 -0
- package/cli/app-catalog.ts +47 -23
- package/cli/app-fonts.ts +19 -1
- package/cli/command-registry.ts +3 -0
- package/cli/commands/control.ts +68 -16
- package/cli/commands/coverage-swift.ts +112 -4
- package/cli/commands/device.ts +3 -1
- package/cli/commands/doctor.ts +1 -4
- package/cli/commands/inspect/settling.ts +6 -1
- package/cli/commands/inspect/wait-ready.ts +22 -2
- package/cli/commands/package.ts +33 -21
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +41 -9
- package/cli/commands/swift.ts +1 -1
- package/cli/current-sim.ts +27 -0
- package/cli/drivers/linux-browser-libs.lock.json +323 -1
- package/cli/drivers/linux-browser-libs.ts +8 -6
- package/cli/drivers/playwright.ts +5 -1
- package/cli/internal-child.ts +11 -1
- package/cli/main.ts +6 -0
- package/cli/native-input.ts +1 -7
- package/cli/outbound-endpoints.ts +9 -1
- package/cli/packaged-app-launcher.ts +3 -1
- package/cli/scene-video.ts +28 -7
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +18 -5
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +9932 -4561
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +30 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6886 -3303
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +7 -2
- package/dist-lib/host/bridge-host.cjs +8513 -3085
- package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +6 -3
- package/dist-lib/index.cjs +175 -80
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +209 -32
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +146 -76
- package/dist-lib/native-app-identity-project.cjs +76 -39
- package/dist-lib/native-app-identity-project.mjs +76 -39
- package/dist-lib/native-app-identity.cjs +10 -3
- package/dist-lib/native-app-identity.mjs +10 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +5 -2
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -23
- package/dist-lib/public-origins-lib.json +138 -80
- package/dist-lib/react-native-host-modules.cjs +5 -2
- package/dist-lib/react-native-host-modules.mjs +5 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +4 -1
- package/dist-lib/sdk.mjs +4 -1
- package/dist-lib/skills.cjs +41126 -36493
- package/dist-lib/swift-compile.cjs +2103 -444
- package/dist-lib/swift-compile.mjs +2025 -369
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +84 -24
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +6094 -2687
- package/dist-lib/vite.cjs +32 -10
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
- package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
- package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
- package/sdk/ios/usr/include/dns_sd.h +3616 -0
- package/sdk/ios/usr/include/dnssd.modulemap +4 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/usr/include/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -265
- package/skills/peach-debug/references/accessibility.md +37 -73
- package/skills/peach-debug/references/commands.md +2 -2
- package/skills/peach-debug/references/events.md +74 -0
- package/skills/peach-perf/SKILL.md +64 -402
- package/skills/peach-perf/references/presentation.md +46 -0
- package/skills/peach-perf/references/profiling.md +93 -0
- package/skills/peach-perf/references/render-counters.md +57 -0
- package/skills/peach-setup/SKILL.md +66 -217
- package/skills/peach-setup/references/native-config.md +35 -0
- package/skills/peach-setup/references/reporting.md +28 -0
- package/skills/peach-test/SKILL.md +68 -285
- package/skills/peach-test/references/detox.md +69 -0
- package/skills/peach-test/references/maestro.md +95 -0
- package/skills/peach-visual/SKILL.md +53 -106
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/appPackageContract.ts +14 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +152 -60
- package/src/cli-runtime.ts +3 -0
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +10 -3
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-native-workspace.ts +211 -52
- package/src/expo-swift-host.ts +149 -123
- package/src/expo-swift-ready.ts +5 -1
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +21 -2
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +6 -1
- package/src/host/bridge-host.ts +5 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/host/websocket-proxy.ts +7 -2
- package/src/kotlin-host.ts +204 -30
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +7 -0
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +261 -261
- package/src/nitro-adapter.ts +118 -50
- package/src/nitro-bundle.ts +134 -96
- package/src/nitro-compile.ts +16 -6
- package/src/nitro-dependencies.ts +43 -28
- package/src/nitro-source.ts +142 -30
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +68 -21
- package/src/react-bridge-importers.ts +1 -0
- package/src/react-native-bridge-modules.ts +2 -0
- package/src/react-native-host-modules.ts +4 -1
- package/src/settingsContract.ts +37 -1
- package/src/storageSnapshotContract.ts +29 -81
- package/src/swift-compile.ts +315 -117
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +19 -13
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +18 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +51 -35
- package/src/swift-link-roots.ts +45 -18
- package/src/swift-objc-compile.ts +78 -2
- package/src/swift-objc-standin.ts +3 -0
- package/src/swift-shared-sdk.ts +85 -1
- package/src/swift-standin-emit.ts +6 -1
- package/src/swift-standins.ts +403 -19
- package/src/swift-submit.ts +17 -1
- package/src/swift-toolchain.ts +98 -23
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +82 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +15 -3
- package/src/vite-plugin.ts +82 -23
- package/src/wasm-optimize.ts +34 -0
- package/src/worker-system-chunks.ts +3 -3
- package/src/xcode-project.ts +52 -0
- package/src/xcode-target-members.ts +12 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
//
|
|
2
|
+
// error.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2016-2019 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_ERROR_H__
|
|
9
|
+
#define __NW_ERROR_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 <dns_sd.h>
|
|
17
|
+
|
|
18
|
+
#include <CoreFoundation/CoreFoundation.h>
|
|
19
|
+
|
|
20
|
+
__BEGIN_DECLS
|
|
21
|
+
|
|
22
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
23
|
+
|
|
24
|
+
/*!
|
|
25
|
+
* @typedef nw_error_t
|
|
26
|
+
* @abstract
|
|
27
|
+
* A network error object with a domain and error code.
|
|
28
|
+
*
|
|
29
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
30
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
31
|
+
*/
|
|
32
|
+
#ifndef NW_ERROR_IMPL
|
|
33
|
+
NW_OBJECT_DECL(nw_error);
|
|
34
|
+
#endif // NW_ERROR_IMPL
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/*!
|
|
38
|
+
* @typedef nw_error_domain_t
|
|
39
|
+
* @abstract
|
|
40
|
+
* The enumeration of network error domains.
|
|
41
|
+
*/
|
|
42
|
+
typedef enum {
|
|
43
|
+
/*! @const nw_error_domain_invalid */
|
|
44
|
+
nw_error_domain_invalid = 0,
|
|
45
|
+
/*! @const nw_error_domain_posix The error code will be a POSIX error as defined in <sys/errno.h> */
|
|
46
|
+
nw_error_domain_posix = 1,
|
|
47
|
+
/*! @const nw_error_domain_dns The error code will be a DNSServiceErrorType error as defined in <dns_sd.h> */
|
|
48
|
+
nw_error_domain_dns = 2,
|
|
49
|
+
/*! @const nw_error_domain_tls The error code will be a TLS error as defined in <Security/SecBase.h> */
|
|
50
|
+
nw_error_domain_tls = 3,
|
|
51
|
+
/*! @const nw_error_domain_wifi_aware The error code will be a Wi-Fi Aware error as defined in <WifiAware/errors.swift> */
|
|
52
|
+
nw_error_domain_wifi_aware API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0)) = 4,
|
|
53
|
+
} nw_error_domain_t;
|
|
54
|
+
|
|
55
|
+
/*!
|
|
56
|
+
* @function nw_error_get_error_domain
|
|
57
|
+
*
|
|
58
|
+
* @abstract
|
|
59
|
+
* Given a reference to a nw_error, returns the error domain.
|
|
60
|
+
*
|
|
61
|
+
* @param error
|
|
62
|
+
* A reference to the nw_error.
|
|
63
|
+
*
|
|
64
|
+
* @returns
|
|
65
|
+
* The error domain.
|
|
66
|
+
*/
|
|
67
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
68
|
+
nw_error_domain_t
|
|
69
|
+
nw_error_get_error_domain(nw_error_t error);
|
|
70
|
+
|
|
71
|
+
/*!
|
|
72
|
+
* @function nw_error_get_error_code
|
|
73
|
+
*
|
|
74
|
+
* @abstract
|
|
75
|
+
* Given a reference to a nw_error, returns the error code.
|
|
76
|
+
*
|
|
77
|
+
* @param error
|
|
78
|
+
* A reference to the nw_error.
|
|
79
|
+
*
|
|
80
|
+
* @returns
|
|
81
|
+
* The error code.
|
|
82
|
+
*/
|
|
83
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
84
|
+
int
|
|
85
|
+
nw_error_get_error_code(nw_error_t error);
|
|
86
|
+
|
|
87
|
+
/*!
|
|
88
|
+
* @const kNWErrorDomainPOSIX
|
|
89
|
+
* @abstract CFErrorRef domain corresponding to nw_error_domain_posix.
|
|
90
|
+
*/
|
|
91
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
92
|
+
extern const CFStringRef kNWErrorDomainPOSIX; // Values will be POSIX errors
|
|
93
|
+
|
|
94
|
+
/*!
|
|
95
|
+
* @const kNWErrorDomainDNS
|
|
96
|
+
* @abstract CFErrorRef domain corresponding to nw_error_domain_posix.
|
|
97
|
+
*/
|
|
98
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
99
|
+
extern const CFStringRef kNWErrorDomainDNS; // Values will be DNSServiceErrorType errors
|
|
100
|
+
|
|
101
|
+
/*!
|
|
102
|
+
* @const kNWErrorDomainTLS
|
|
103
|
+
* @abstract CFErrorRef domain corresponding to nw_error_domain_tls.
|
|
104
|
+
*/
|
|
105
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
106
|
+
extern const CFStringRef kNWErrorDomainTLS; // Values will be errSSL* errors
|
|
107
|
+
|
|
108
|
+
/*!
|
|
109
|
+
* @const kNWErrorDomainWiFiAware
|
|
110
|
+
* @abstract CFErrorRef domain corresponding to nw_error_domain_wifi_aware.
|
|
111
|
+
*/
|
|
112
|
+
API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0))
|
|
113
|
+
extern const CFStringRef kNWErrorDomainWiFiAware; // Values will be errors from <WifiAware/errors.swift>
|
|
114
|
+
|
|
115
|
+
/*!
|
|
116
|
+
* @function nw_error_copy_cf_error
|
|
117
|
+
*
|
|
118
|
+
* @abstract
|
|
119
|
+
* Given a reference to nw_error, returns a CFErrorRef representing the same error.
|
|
120
|
+
*
|
|
121
|
+
* @param error
|
|
122
|
+
* A reference to the nw_error.
|
|
123
|
+
*
|
|
124
|
+
* @returns
|
|
125
|
+
* The CFErrorRef. The caller is responsible for calling CFRelease on the returned value.
|
|
126
|
+
*/
|
|
127
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
128
|
+
CFErrorRef
|
|
129
|
+
nw_error_copy_cf_error(nw_error_t error);
|
|
130
|
+
|
|
131
|
+
NW_ASSUME_NONNULL_END
|
|
132
|
+
|
|
133
|
+
__END_DECLS
|
|
134
|
+
|
|
135
|
+
#endif /* __NW_ERROR_H__ */
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ethernet_channel.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2019, 2021 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_ETHERNET_CHANNEL_H__
|
|
9
|
+
#define __NW_ETHERNET_CHANNEL_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/error.h>
|
|
16
|
+
#include <Network/parameters.h>
|
|
17
|
+
|
|
18
|
+
__BEGIN_DECLS
|
|
19
|
+
|
|
20
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
21
|
+
|
|
22
|
+
/*!
|
|
23
|
+
* @typedef nw_ethernet_channel_t
|
|
24
|
+
* @abstract
|
|
25
|
+
* An Ethernet channel is an object that represents a bi-directional data channel to send
|
|
26
|
+
* and receive Ethernet frames with a custom EtherType.
|
|
27
|
+
*
|
|
28
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
29
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
30
|
+
*/
|
|
31
|
+
#ifndef NW_ETHERNET_CHANNEL_IMPL
|
|
32
|
+
NW_OBJECT_DECL(nw_ethernet_channel);
|
|
33
|
+
#endif // NW_ETHERNET_CHANNEL_IMPL
|
|
34
|
+
|
|
35
|
+
/*!
|
|
36
|
+
* @typedef nw_ethernet_channel_state_t
|
|
37
|
+
* @abstract
|
|
38
|
+
* Channel states sent by nw_ethernet_channel_set_state_changed_handler.
|
|
39
|
+
* States generally progress forward and do not move backwards, with the
|
|
40
|
+
* exception of preparing and waiting, which may alternate before the channel
|
|
41
|
+
* becomes ready or failed.
|
|
42
|
+
*/
|
|
43
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
44
|
+
typedef enum {
|
|
45
|
+
/*!
|
|
46
|
+
* @const nw_ethernet_channel_state_invalid The state of the channel is not valid. This state
|
|
47
|
+
* will never be delivered in the channel's state update handler, and can be treated as
|
|
48
|
+
* an unexpected value.
|
|
49
|
+
*/
|
|
50
|
+
nw_ethernet_channel_state_invalid = 0,
|
|
51
|
+
/*! @const nw_ethernet_channel_state_waiting The channel is waiting for a usable network before re-attempting */
|
|
52
|
+
nw_ethernet_channel_state_waiting = 1,
|
|
53
|
+
/*! @const nw_ethernet_channel_state_preparing The channel is in the process of establishing */
|
|
54
|
+
nw_ethernet_channel_state_preparing = 2,
|
|
55
|
+
/*! @const nw_ethernet_channel_state_ready The channel is established and ready to send and receive data */
|
|
56
|
+
nw_ethernet_channel_state_ready = 3,
|
|
57
|
+
/*! @const nw_ethernet_channel_state_failed The channel has irrecoverably closed or failed */
|
|
58
|
+
nw_ethernet_channel_state_failed = 4,
|
|
59
|
+
/*! @const nw_ethernet_channel_state_cancelled The channel has been cancelled by the caller */
|
|
60
|
+
nw_ethernet_channel_state_cancelled = 5,
|
|
61
|
+
} nw_ethernet_channel_state_t;
|
|
62
|
+
|
|
63
|
+
/*!
|
|
64
|
+
* @function nw_ethernet_channel_create
|
|
65
|
+
*
|
|
66
|
+
* @abstract
|
|
67
|
+
* Creates an Ethernet channel with a custom EtherType.
|
|
68
|
+
*
|
|
69
|
+
* @param ether_type
|
|
70
|
+
* The custom EtherType to be used for all Ethernet frames in this channel. The
|
|
71
|
+
* EtherType is the two-octet field in an Ethernet frame, indicating the protocol
|
|
72
|
+
* encapsulated in the payload of the frame. This parameter is in little-endian
|
|
73
|
+
* byte order. Only custom EtherType values are supported. This parameter cannot
|
|
74
|
+
* be an EtherType already handled by the system, such as IPv4, IPv6, ARP, VLAN Tag,
|
|
75
|
+
* or 802.1x.
|
|
76
|
+
*
|
|
77
|
+
* Calling processes must hold the "com.apple.developer.networking.custom-protocol"
|
|
78
|
+
* entitlement.
|
|
79
|
+
*
|
|
80
|
+
* @param interface
|
|
81
|
+
* The interface on which this custom Ethernet channel will be allowed.
|
|
82
|
+
*
|
|
83
|
+
* @result
|
|
84
|
+
* Returns an allocated nw_ethernet_channel_t object on success.
|
|
85
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
86
|
+
* These objects support ARC.
|
|
87
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
88
|
+
*/
|
|
89
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
90
|
+
NW_RETURNS_RETAINED nw_ethernet_channel_t
|
|
91
|
+
nw_ethernet_channel_create(uint16_t ether_type, nw_interface_t interface);
|
|
92
|
+
|
|
93
|
+
/*!
|
|
94
|
+
* @function nw_ethernet_channel_create_with_parameters
|
|
95
|
+
*
|
|
96
|
+
* @abstract
|
|
97
|
+
* Creates an Ethernet channel with a custom EtherType and networking parameters
|
|
98
|
+
*
|
|
99
|
+
* @param ether_type
|
|
100
|
+
* The custom EtherType to be used for all Ethernet frames in this channel. The
|
|
101
|
+
* EtherType is the two-octet field in an Ethernet frame, indicating the protocol
|
|
102
|
+
* encapsulated in the payload of the frame. This parameter is in little-endian
|
|
103
|
+
* byte order. Only custom EtherType values are supported. This parameter cannot
|
|
104
|
+
* be an EtherType already handled by the system, such as IPv4, IPv6, ARP, VLAN Tag,
|
|
105
|
+
* or 802.1x.
|
|
106
|
+
*
|
|
107
|
+
* Calling processes must hold the "com.apple.developer.networking.custom-protocol"
|
|
108
|
+
* entitlement.
|
|
109
|
+
*
|
|
110
|
+
* @param interface
|
|
111
|
+
* The interface on which this custom Ethernet channel will be allowed.
|
|
112
|
+
*
|
|
113
|
+
* @param parameters
|
|
114
|
+
* nw_parameters_t that allows caller to specify networking parameters such as custom context and queue.
|
|
115
|
+
*
|
|
116
|
+
* @result
|
|
117
|
+
* Returns an allocated nw_ethernet_channel_t object on success.
|
|
118
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
119
|
+
* These objects support ARC.
|
|
120
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
121
|
+
*/
|
|
122
|
+
API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
123
|
+
NW_RETURNS_RETAINED nw_ethernet_channel_t
|
|
124
|
+
nw_ethernet_channel_create_with_parameters(uint16_t ether_type, nw_interface_t interface, nw_parameters_t parameters);
|
|
125
|
+
#ifdef __BLOCKS__
|
|
126
|
+
|
|
127
|
+
/*!
|
|
128
|
+
* @typedef nw_ethernet_channel_state_changed_handler_t
|
|
129
|
+
* @abstract
|
|
130
|
+
* A state change handler to handle state changes.
|
|
131
|
+
*
|
|
132
|
+
* @param state
|
|
133
|
+
* The current state.
|
|
134
|
+
*
|
|
135
|
+
* @param error
|
|
136
|
+
* error if present, indicates the reason of the failure.
|
|
137
|
+
*/
|
|
138
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
139
|
+
typedef void (^nw_ethernet_channel_state_changed_handler_t)(nw_ethernet_channel_state_t state, _Nullable nw_error_t error);
|
|
140
|
+
|
|
141
|
+
/*!
|
|
142
|
+
* @function nw_ethernet_channel_set_state_changed_handler
|
|
143
|
+
*
|
|
144
|
+
* @abstract
|
|
145
|
+
* Sets the state change handler. For clients that need to perform cleanup when the
|
|
146
|
+
* channel has been cancelled, the nw_ethernet_channel_state_cancelled state will
|
|
147
|
+
* be delivered last.
|
|
148
|
+
*
|
|
149
|
+
* @param ethernet_channel
|
|
150
|
+
* The ethernet_channel object.
|
|
151
|
+
*
|
|
152
|
+
* @param handler
|
|
153
|
+
* The state changed handler to call when the channel state changes.
|
|
154
|
+
* Pass NULL to remove the state changed handler.
|
|
155
|
+
*/
|
|
156
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
157
|
+
void
|
|
158
|
+
nw_ethernet_channel_set_state_changed_handler(nw_ethernet_channel_t ethernet_channel,
|
|
159
|
+
_Nullable nw_ethernet_channel_state_changed_handler_t handler);
|
|
160
|
+
|
|
161
|
+
#endif // __BLOCKS__
|
|
162
|
+
|
|
163
|
+
/*!
|
|
164
|
+
* @function nw_ethernet_channel_set_queue
|
|
165
|
+
*
|
|
166
|
+
* @abstract
|
|
167
|
+
* Sets the client callback queue, on which blocks for events will
|
|
168
|
+
* be scheduled. This must be done before calling nw_ethernet_channel_start().
|
|
169
|
+
*
|
|
170
|
+
* @param ethernet_channel
|
|
171
|
+
* The ethernet_channel object.
|
|
172
|
+
*
|
|
173
|
+
* @param queue
|
|
174
|
+
* The client's dispatch queue.
|
|
175
|
+
*/
|
|
176
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
177
|
+
void
|
|
178
|
+
nw_ethernet_channel_set_queue(nw_ethernet_channel_t ethernet_channel, dispatch_queue_t queue);
|
|
179
|
+
|
|
180
|
+
/*!
|
|
181
|
+
* @function nw_ethernet_channel_get_maximum_payload_size
|
|
182
|
+
*
|
|
183
|
+
* @abstract
|
|
184
|
+
* Returns the maximum payload size that can be written
|
|
185
|
+
* on the channel. Any payloads written must be less than
|
|
186
|
+
* or equal to this size. Payloads exceeding this size will be
|
|
187
|
+
* dropped by 'nw_ethernet_channel_send()'.
|
|
188
|
+
*
|
|
189
|
+
* @param ethernet_channel
|
|
190
|
+
* The ethernet_channel object.
|
|
191
|
+
*
|
|
192
|
+
* @result
|
|
193
|
+
* Returns a payload size based on the current MTU of the channel.
|
|
194
|
+
*/
|
|
195
|
+
API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
196
|
+
uint32_t
|
|
197
|
+
nw_ethernet_channel_get_maximum_payload_size(nw_ethernet_channel_t ethernet_channel);
|
|
198
|
+
|
|
199
|
+
/*!
|
|
200
|
+
* @function nw_ethernet_channel_start
|
|
201
|
+
*
|
|
202
|
+
* @abstract
|
|
203
|
+
* Starts the Ethernet channel, which will cause the channel to evaluate
|
|
204
|
+
* its path, and try to become readable and writable.
|
|
205
|
+
*
|
|
206
|
+
* @param ethernet_channel
|
|
207
|
+
* The ethernet_channel object.
|
|
208
|
+
*/
|
|
209
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
210
|
+
void
|
|
211
|
+
nw_ethernet_channel_start(nw_ethernet_channel_t ethernet_channel);
|
|
212
|
+
|
|
213
|
+
/*!
|
|
214
|
+
* @function nw_ethernet_channel_cancel
|
|
215
|
+
*
|
|
216
|
+
* @abstract
|
|
217
|
+
* Cancel the Ethernet channel. This will close the channel. The process of cancellation will be
|
|
218
|
+
* completed asynchronously, and the final callback event delivered to the caller will be
|
|
219
|
+
* a state update with a value of nw_ethernet_channel_state_cancelled. Once this update is
|
|
220
|
+
* delivered, the caller may clean up any associated memory or objects.
|
|
221
|
+
*
|
|
222
|
+
* Outstanding sends and receives will receive errors before the state changes to cancelled.
|
|
223
|
+
* There is no guarantee that any outstanding sends that have not yet delivered
|
|
224
|
+
* completion handlers will send data before the channel is closed.
|
|
225
|
+
*
|
|
226
|
+
* @param ethernet_channel
|
|
227
|
+
* The ethernet_channel object.
|
|
228
|
+
*/
|
|
229
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
230
|
+
void
|
|
231
|
+
nw_ethernet_channel_cancel(nw_ethernet_channel_t ethernet_channel);
|
|
232
|
+
|
|
233
|
+
#ifdef __BLOCKS__
|
|
234
|
+
|
|
235
|
+
/*!
|
|
236
|
+
* @typedef nw_ethernet_address_t
|
|
237
|
+
* @abstract
|
|
238
|
+
* Address for an Ethernet Frame.
|
|
239
|
+
*/
|
|
240
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
241
|
+
typedef unsigned char nw_ethernet_address_t[6];
|
|
242
|
+
|
|
243
|
+
/*!
|
|
244
|
+
* @typedef nw_ethernet_channel_receive_handler_t
|
|
245
|
+
* @abstract
|
|
246
|
+
* This receive handler is invoked when a frame of the set EtherType is received from the Ethernet
|
|
247
|
+
* channel.
|
|
248
|
+
*
|
|
249
|
+
* @param content
|
|
250
|
+
* The received Ethernet payload, which has a length constrained by the maximum Ethernet frame size
|
|
251
|
+
* of 1518 minus Ethernet header size of (18/14 bytes with/without vlan tag).
|
|
252
|
+
*
|
|
253
|
+
* @param vlan_tag
|
|
254
|
+
* The vlan tag of the frame, 0 if there is no vlan tag. This parameter is in little-endian
|
|
255
|
+
* byte order.
|
|
256
|
+
*
|
|
257
|
+
* @param local_address
|
|
258
|
+
* The local Ethernet address in the received Ethernet frame header.
|
|
259
|
+
*
|
|
260
|
+
* @param remote_address
|
|
261
|
+
* The remote Ethernet address in the received Ethernet frame header.
|
|
262
|
+
*
|
|
263
|
+
*/
|
|
264
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
265
|
+
typedef void (^nw_ethernet_channel_receive_handler_t)(dispatch_data_t content,
|
|
266
|
+
uint16_t vlan_tag,
|
|
267
|
+
_Nonnull nw_ethernet_address_t local_address,
|
|
268
|
+
_Nonnull nw_ethernet_address_t remote_address);
|
|
269
|
+
|
|
270
|
+
/*!
|
|
271
|
+
* @function nw_ethernet_channel_set_receive_handler
|
|
272
|
+
*
|
|
273
|
+
* @abstract
|
|
274
|
+
* Sets the Ethernet channel receive handler. Should be called before nw_ethernet_channel_start.
|
|
275
|
+
*
|
|
276
|
+
* @param ethernet_channel
|
|
277
|
+
* The Ethernet channel object.
|
|
278
|
+
*
|
|
279
|
+
* @param handler
|
|
280
|
+
* The event handler to call when the Ethernet channel receives a new frame.
|
|
281
|
+
* Pass NULL to remove the receive handler.
|
|
282
|
+
*/
|
|
283
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
284
|
+
void
|
|
285
|
+
nw_ethernet_channel_set_receive_handler(nw_ethernet_channel_t ethernet_channel,
|
|
286
|
+
_Nullable nw_ethernet_channel_receive_handler_t handler);
|
|
287
|
+
|
|
288
|
+
/*!
|
|
289
|
+
* @typedef nw_ethernet_channel_send_completion_t
|
|
290
|
+
* @abstract
|
|
291
|
+
* A send completion is invoked exactly once for a call to nw_ethernet_channel_send().
|
|
292
|
+
* The completion indicates that the sent Ethernet frame has been processed by the stack
|
|
293
|
+
* (not necessarily that it has left the host), or else an error has occurred during
|
|
294
|
+
* sending.
|
|
295
|
+
*
|
|
296
|
+
* @param error
|
|
297
|
+
* An error will be sent if the associated frame could not be fully sent before an
|
|
298
|
+
* error occurred. An error will be sent for any outstanding sends when the channel
|
|
299
|
+
* is cancelled.
|
|
300
|
+
*/
|
|
301
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
302
|
+
typedef void (^nw_ethernet_channel_send_completion_t)(_Nullable nw_error_t error);
|
|
303
|
+
|
|
304
|
+
/*!
|
|
305
|
+
* @function nw_ethernet_channel_send
|
|
306
|
+
*
|
|
307
|
+
* @abstract
|
|
308
|
+
* Send an Ethernet frame on a channel. This must be called after the channel
|
|
309
|
+
* becomes ready. This is an asynchronous send and the completion block can be used
|
|
310
|
+
* to determine when the send is complete.
|
|
311
|
+
*
|
|
312
|
+
* @param ethernet_channel
|
|
313
|
+
* The ethernet_channel object on which to send frame.
|
|
314
|
+
*
|
|
315
|
+
* @param content
|
|
316
|
+
* An Ethernet payload to send.
|
|
317
|
+
*
|
|
318
|
+
* @param vlan_tag
|
|
319
|
+
* The vlan tag of the frame. If vlan_tag is specified, the 802.1Q tag will be included.
|
|
320
|
+
* TPID will be set to 0x8100 followed by the specified 16-bit vlan_tag (only the highest
|
|
321
|
+
* 3-bit class of service field is supported. The remaining 13 bits must be set to zero).
|
|
322
|
+
* Pass 0 to omit the vlan tag for this frame.
|
|
323
|
+
*
|
|
324
|
+
* @param remote_address
|
|
325
|
+
* Remote Ethernet address for this Ethernet frame. This is a required parameter.
|
|
326
|
+
* Note that the local Ethernet address will be the Ethernet address of the specified
|
|
327
|
+
* interface of this Ethernet channel.
|
|
328
|
+
*
|
|
329
|
+
* @param completion
|
|
330
|
+
* A callback to be called when the data has been sent, or an error has occurred.
|
|
331
|
+
* This callback does not indicate that the remote side has acknowledged the data.
|
|
332
|
+
* This callback does indicate that the data has been sent.
|
|
333
|
+
*/
|
|
334
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
335
|
+
NW_SWIFT_DISABLE_ASYNC
|
|
336
|
+
void
|
|
337
|
+
nw_ethernet_channel_send(nw_ethernet_channel_t ethernet_channel,
|
|
338
|
+
dispatch_data_t content,
|
|
339
|
+
uint16_t vlan_tag,
|
|
340
|
+
_Nonnull nw_ethernet_address_t remote_address,
|
|
341
|
+
nw_ethernet_channel_send_completion_t completion);
|
|
342
|
+
|
|
343
|
+
#endif // __BLOCKS__
|
|
344
|
+
|
|
345
|
+
NW_ASSUME_NONNULL_END
|
|
346
|
+
|
|
347
|
+
__END_DECLS
|
|
348
|
+
|
|
349
|
+
#endif /* __NW_ETHERNET_CHANNEL_H__ */
|