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.
- 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 +67 -16
- 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 +22 -20
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +37 -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 +4 -0
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +9 -4
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- 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 +7372 -3675
- 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 +22 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6340 -3064
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +6524 -2720
- package/dist-lib/host/fetch-proxy-handler.cjs +8 -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 +97 -31
- 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 +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -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 +71 -29
- package/dist-lib/native-app-identity-project.cjs +53 -22
- package/dist-lib/native-app-identity-project.mjs +53 -22
- 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 +1 -1
- 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 +111 -79
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- 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 +40549 -37613
- package/dist-lib/swift-compile.cjs +2054 -388
- package/dist-lib/swift-compile.mjs +1976 -312
- 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 +68 -8
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +5867 -2646
- package/dist-lib/vite.cjs +18 -8
- 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/image-loader.d.ts +0 -3
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- 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 +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/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 +8 -0
- 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 +5 -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 +1 -0
- 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 +7 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- 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 +0 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +356 -61
- 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/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/native-hashes.json +1 -1
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -264
- 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 -401
- 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 -216
- 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 -284
- 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 -105
- package/src/appPackageContract.ts +12 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +133 -59
- package/src/cli-runtime.ts +8 -9
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +3 -0
- package/src/expo-native-workspace.ts +81 -17
- package/src/expo-swift-host.ts +57 -104
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoSwiftContract.ts +13 -1
- package/src/host/websocket-proxy.ts +7 -2
- package/src/native-prebuilt.ts +3 -3
- package/src/nitro-adapter.lock.json +263 -263
- package/src/nitro-adapter.ts +69 -7
- package/src/nitro-bundle.ts +52 -24
- package/src/nitro-compile.ts +6 -1
- package/src/nitro-source.ts +82 -4
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroContract.ts +5 -1
- package/src/react-bridge-importers.ts +1 -0
- package/src/settingsContract.ts +26 -1
- package/src/swift-compile.ts +267 -68
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +10 -12
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +15 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +48 -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-standins.ts +233 -11
- package/src/swift-submit.ts +13 -1
- package/src/swift-toolchain.ts +82 -7
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +11 -10
- package/src/turbo-runtime.lock.json +16 -16
- package/src/vite-plugin-one.ts +12 -1
- 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,184 @@
|
|
|
1
|
+
//
|
|
2
|
+
// group_descriptor.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2019-2020 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_GROUP_DESCRIPTOR_H__
|
|
9
|
+
#define __NW_GROUP_DESCRIPTOR_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/endpoint.h>
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
19
|
+
|
|
20
|
+
__BEGIN_DECLS
|
|
21
|
+
|
|
22
|
+
/*!
|
|
23
|
+
* @typedef nw_group_descriptor_t
|
|
24
|
+
* @abstract
|
|
25
|
+
* A Group Descriptor is a collection of endpoints which can be used
|
|
26
|
+
* for sending and receiving messages.
|
|
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_GROUP_DESCRIPTOR_IMPL
|
|
32
|
+
NW_OBJECT_DECL(nw_group_descriptor);
|
|
33
|
+
#endif // NW_GROUP_DESCRIPTOR_IMPL
|
|
34
|
+
|
|
35
|
+
/*!
|
|
36
|
+
* @function nw_group_descriptor_create_multiplex
|
|
37
|
+
*
|
|
38
|
+
* @abstract
|
|
39
|
+
* Creates a new group descriptor object based on an endpoint
|
|
40
|
+
* to which communication will be established using a multiplexing protocol,
|
|
41
|
+
* represented as an nw_endpoint containing the remote endpoint
|
|
42
|
+
* to use for communication.
|
|
43
|
+
*
|
|
44
|
+
* @param remote_endpoint
|
|
45
|
+
* An endpoint that can be used for communication over a multiplexing protocol.
|
|
46
|
+
*
|
|
47
|
+
* @result
|
|
48
|
+
* An instantiated group descriptor object or nil if the specified
|
|
49
|
+
* endpoint is not valid.
|
|
50
|
+
*/
|
|
51
|
+
API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
|
|
52
|
+
NW_RETURNS_RETAINED nw_group_descriptor_t
|
|
53
|
+
nw_group_descriptor_create_multiplex(nw_endpoint_t remote_endpoint);
|
|
54
|
+
|
|
55
|
+
/*!
|
|
56
|
+
* @function nw_group_descriptor_create_multicast
|
|
57
|
+
*
|
|
58
|
+
* @abstract
|
|
59
|
+
* Creates a new group descriptor object based on a multicast group,
|
|
60
|
+
* represented as an address endpoint.
|
|
61
|
+
*
|
|
62
|
+
* @param multicast_group
|
|
63
|
+
* An address endpoint that contains a multicast group to join.
|
|
64
|
+
*
|
|
65
|
+
* @result
|
|
66
|
+
* An instantiated group descriptor object or nil if the specified
|
|
67
|
+
* endpoint is not an address endpoint representing a valid multicast
|
|
68
|
+
* group.
|
|
69
|
+
*/
|
|
70
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
71
|
+
NW_RETURNS_RETAINED nw_group_descriptor_t
|
|
72
|
+
nw_group_descriptor_create_multicast(nw_endpoint_t multicast_group);
|
|
73
|
+
|
|
74
|
+
/*!
|
|
75
|
+
* @function nw_group_descriptor_add_endpoint
|
|
76
|
+
*
|
|
77
|
+
* @abstract
|
|
78
|
+
* Add an additional endpoint to a given group descriptor.
|
|
79
|
+
*
|
|
80
|
+
* @param descriptor
|
|
81
|
+
* A group descriptor.
|
|
82
|
+
*
|
|
83
|
+
* @param endpoint
|
|
84
|
+
* An endpoint to add to the group.
|
|
85
|
+
*
|
|
86
|
+
* @result Returns true if the endpoint was added, false if the endpoint was
|
|
87
|
+
* not of a valid type and therefore not added.
|
|
88
|
+
*/
|
|
89
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
90
|
+
bool
|
|
91
|
+
nw_group_descriptor_add_endpoint(nw_group_descriptor_t descriptor,
|
|
92
|
+
nw_endpoint_t endpoint);
|
|
93
|
+
|
|
94
|
+
#ifdef __BLOCKS__
|
|
95
|
+
|
|
96
|
+
/*!
|
|
97
|
+
* @typedef nw_group_descriptor_enumerate_endpoints_block_t
|
|
98
|
+
*
|
|
99
|
+
* @abstract
|
|
100
|
+
* A block called to enumerate the endpoints that are members of a group.
|
|
101
|
+
*
|
|
102
|
+
* @param endpoint
|
|
103
|
+
* A member of a group.
|
|
104
|
+
*
|
|
105
|
+
* @return Returning true from the block will continue enumeration, and returning
|
|
106
|
+
* false will stop enumeration.
|
|
107
|
+
*/
|
|
108
|
+
typedef bool (^nw_group_descriptor_enumerate_endpoints_block_t)(nw_endpoint_t endpoint);
|
|
109
|
+
|
|
110
|
+
/*!
|
|
111
|
+
* @function nw_group_descriptor_enumerate_endpoints
|
|
112
|
+
*
|
|
113
|
+
* @abstract
|
|
114
|
+
* List all endpoints associated with the group descriptor.
|
|
115
|
+
*
|
|
116
|
+
* @param descriptor
|
|
117
|
+
* The group descriptor object to check.
|
|
118
|
+
*
|
|
119
|
+
* @param enumerate_block
|
|
120
|
+
* A block to which the endpoints associated with the descriptor will be passed.
|
|
121
|
+
* Returning true from the block will continue to enumerate, and returning false will stop
|
|
122
|
+
* enumerating.
|
|
123
|
+
*/
|
|
124
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
125
|
+
void
|
|
126
|
+
nw_group_descriptor_enumerate_endpoints(nw_group_descriptor_t descriptor,
|
|
127
|
+
NW_NOESCAPE nw_group_descriptor_enumerate_endpoints_block_t enumerate_block);
|
|
128
|
+
|
|
129
|
+
#endif // __BLOCKS__
|
|
130
|
+
|
|
131
|
+
/*!
|
|
132
|
+
* @function nw_multicast_group_descriptor_set_specific_source
|
|
133
|
+
*
|
|
134
|
+
* @abstract
|
|
135
|
+
* Require a particular source for this multicast group descriptor.
|
|
136
|
+
*
|
|
137
|
+
* @param multicast_descriptor
|
|
138
|
+
* The multicast group descriptor to modify.
|
|
139
|
+
*
|
|
140
|
+
* @param source
|
|
141
|
+
* An endpoint describing the source for this descriptor.
|
|
142
|
+
*/
|
|
143
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
144
|
+
void
|
|
145
|
+
nw_multicast_group_descriptor_set_specific_source(nw_group_descriptor_t multicast_descriptor,
|
|
146
|
+
nw_endpoint_t source);
|
|
147
|
+
|
|
148
|
+
/*!
|
|
149
|
+
* @function nw_multicast_group_descriptor_set_disable_unicast_traffic
|
|
150
|
+
*
|
|
151
|
+
* @abstract
|
|
152
|
+
* Disable receiving unicast traffic for a connection group that is also receiving multicast traffic.
|
|
153
|
+
*
|
|
154
|
+
* @param multicast_descriptor
|
|
155
|
+
* The multicast group descriptor to modify.
|
|
156
|
+
*
|
|
157
|
+
* @param disable_unicast_traffic
|
|
158
|
+
* A boolean indicating if receiving unicast traffic should be disabled.
|
|
159
|
+
*/
|
|
160
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
161
|
+
void
|
|
162
|
+
nw_multicast_group_descriptor_set_disable_unicast_traffic(nw_group_descriptor_t multicast_descriptor,
|
|
163
|
+
bool disable_unicast_traffic);
|
|
164
|
+
|
|
165
|
+
/*!
|
|
166
|
+
* @function nw_multicast_group_descriptor_get_disable_unicast_traffic
|
|
167
|
+
*
|
|
168
|
+
* @abstract
|
|
169
|
+
* Check if receiving unicast traffic has been disabled for a multicast connection group.
|
|
170
|
+
*
|
|
171
|
+
* @param multicast_descriptor
|
|
172
|
+
* The multicast group descriptor to check.
|
|
173
|
+
*
|
|
174
|
+
* @result A boolean indicating if receiving unicast traffic should be disabled.
|
|
175
|
+
*/
|
|
176
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
177
|
+
bool
|
|
178
|
+
nw_multicast_group_descriptor_get_disable_unicast_traffic(nw_group_descriptor_t multicast_descriptor);
|
|
179
|
+
|
|
180
|
+
__END_DECLS
|
|
181
|
+
|
|
182
|
+
NW_ASSUME_NONNULL_END
|
|
183
|
+
|
|
184
|
+
#endif /* __NW_GROUP_DESCRIPTOR_H__ */
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
//
|
|
2
|
+
// interface.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2017-2019 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
#ifndef __NW_INTERFACE_H__
|
|
8
|
+
#define __NW_INTERFACE_H__
|
|
9
|
+
|
|
10
|
+
#ifndef __NW_INDIRECT__
|
|
11
|
+
#warning "Please include <Network/Network.h> instead of this file directly."
|
|
12
|
+
#endif // __NW_INDIRECT__
|
|
13
|
+
|
|
14
|
+
#include <Network/nw_object.h>
|
|
15
|
+
|
|
16
|
+
#include <stdbool.h>
|
|
17
|
+
#include <stdint.h>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
__BEGIN_DECLS
|
|
21
|
+
|
|
22
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
23
|
+
|
|
24
|
+
/*!
|
|
25
|
+
* @typedef nw_interface_t
|
|
26
|
+
* @abstract
|
|
27
|
+
* A Network Interface is an object that represents a static snapshot of an interface
|
|
28
|
+
* that provides network connectivity, such as a Wi-Fi link, an Ethernet connection,
|
|
29
|
+
* a Cellular service, a VPN, or the loopback interface.
|
|
30
|
+
*
|
|
31
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
32
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
33
|
+
*/
|
|
34
|
+
#ifndef NW_INTERFACE_IMPL
|
|
35
|
+
NW_OBJECT_DECL(nw_interface);
|
|
36
|
+
#endif // NW_INTERFACE_IMPL
|
|
37
|
+
|
|
38
|
+
/*!
|
|
39
|
+
* @typedef nw_interface_type_t
|
|
40
|
+
* @abstract
|
|
41
|
+
* Interface types represent the underlying media for a network link, such as Wi-Fi or
|
|
42
|
+
* Cellular.
|
|
43
|
+
*/
|
|
44
|
+
typedef enum {
|
|
45
|
+
/*! @const nw_interface_type_other A virtual or otherwise unknown interface type */
|
|
46
|
+
nw_interface_type_other = 0,
|
|
47
|
+
/*! @const nw_interface_type_wifi A Wi-Fi link */
|
|
48
|
+
nw_interface_type_wifi = 1,
|
|
49
|
+
/*! @const nw_interface_type_wifi A Cellular link */
|
|
50
|
+
nw_interface_type_cellular = 2,
|
|
51
|
+
/*! @const nw_interface_type_wired A Wired Ethernet link */
|
|
52
|
+
nw_interface_type_wired = 3,
|
|
53
|
+
/*! @const nw_interface_type_loopback The loopback interface */
|
|
54
|
+
nw_interface_type_loopback = 4,
|
|
55
|
+
} nw_interface_type_t;
|
|
56
|
+
|
|
57
|
+
/*!
|
|
58
|
+
* @function nw_interface_get_type
|
|
59
|
+
*
|
|
60
|
+
* @abstract
|
|
61
|
+
* Retrieves the type of an interface. This only accesses the type of the specific
|
|
62
|
+
* interface being queried, and will not take into account types used by interfaces
|
|
63
|
+
* that traffic will eventually be routed through. That is, if the interface is a virtual
|
|
64
|
+
* interface (such as a VPN) that eventually forwards traffic through Wi-Fi, the type
|
|
65
|
+
* will be nw_interface_type_other, not nw_interface_type_wifi.
|
|
66
|
+
*
|
|
67
|
+
* @param interface
|
|
68
|
+
* The interface object to check.
|
|
69
|
+
*
|
|
70
|
+
* @result
|
|
71
|
+
* Returns the type of the interface.
|
|
72
|
+
*/
|
|
73
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
74
|
+
nw_interface_type_t
|
|
75
|
+
nw_interface_get_type(nw_interface_t interface);
|
|
76
|
+
|
|
77
|
+
/*!
|
|
78
|
+
* @typedef nw_interface_radio_type_t
|
|
79
|
+
* @abstract
|
|
80
|
+
* Interface radio types represent the radio technology for a network link.
|
|
81
|
+
*/
|
|
82
|
+
typedef enum {
|
|
83
|
+
nw_interface_radio_type_unknown = 0,
|
|
84
|
+
nw_interface_radio_type_wifi_b = 1,
|
|
85
|
+
nw_interface_radio_type_wifi_a = 2,
|
|
86
|
+
nw_interface_radio_type_wifi_g = 3,
|
|
87
|
+
nw_interface_radio_type_wifi_n = 4,
|
|
88
|
+
nw_interface_radio_type_wifi_ac = 5,
|
|
89
|
+
nw_interface_radio_type_wifi_ax = 6,
|
|
90
|
+
|
|
91
|
+
// 4G LTE
|
|
92
|
+
nw_interface_radio_type_cell_lte = 0x80,
|
|
93
|
+
// 5G Dual LTE & New Radio Sub6
|
|
94
|
+
nw_interface_radio_type_cell_endc_sub6 = 0x81,
|
|
95
|
+
// 5G Dual LTE & New Radio mmWave
|
|
96
|
+
nw_interface_radio_type_cell_endc_mmw = 0x82,
|
|
97
|
+
// 5G Stand Alone New Radio Sub6
|
|
98
|
+
nw_interface_radio_type_cell_nr_sa_sub6 = 0x83,
|
|
99
|
+
// 5G Stand Alone New Radio mmWave
|
|
100
|
+
nw_interface_radio_type_cell_nr_sa_mmw = 0x84,
|
|
101
|
+
// 3G WCDMA
|
|
102
|
+
nw_interface_radio_type_cell_wcdma = 0x85,
|
|
103
|
+
// 2G GSM
|
|
104
|
+
nw_interface_radio_type_cell_gsm = 0x86,
|
|
105
|
+
// 1x data
|
|
106
|
+
nw_interface_radio_type_cell_cdma = 0x87,
|
|
107
|
+
// HDR data
|
|
108
|
+
nw_interface_radio_type_cell_evdo = 0x88,
|
|
109
|
+
} nw_interface_radio_type_t;
|
|
110
|
+
|
|
111
|
+
/*!
|
|
112
|
+
* @function nw_interface_get_name
|
|
113
|
+
*
|
|
114
|
+
* @abstract
|
|
115
|
+
* Retrieves the name of an interface, to be used for reference or logging
|
|
116
|
+
* purposes.
|
|
117
|
+
*
|
|
118
|
+
* @param interface
|
|
119
|
+
* The interface object to check.
|
|
120
|
+
*
|
|
121
|
+
* @result
|
|
122
|
+
* Returns the name of the interface as a NULL-terminated C string,
|
|
123
|
+
* or NULL if the interface is NULL.
|
|
124
|
+
*/
|
|
125
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
126
|
+
const char *
|
|
127
|
+
nw_interface_get_name(nw_interface_t interface);
|
|
128
|
+
|
|
129
|
+
/*!
|
|
130
|
+
* @function nw_interface_get_index
|
|
131
|
+
*
|
|
132
|
+
* @abstract
|
|
133
|
+
* Retrieves the index of an interface, to be used for reference or logging
|
|
134
|
+
* purposes. This is the same value as provided by if_nametoindex.
|
|
135
|
+
*
|
|
136
|
+
* @param interface
|
|
137
|
+
* The interface object to check.
|
|
138
|
+
*
|
|
139
|
+
* @result
|
|
140
|
+
* Returns the index of the interface, or 0 if the interface is NULL.
|
|
141
|
+
*/
|
|
142
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
143
|
+
uint32_t
|
|
144
|
+
nw_interface_get_index(nw_interface_t interface);
|
|
145
|
+
|
|
146
|
+
NW_ASSUME_NONNULL_END
|
|
147
|
+
|
|
148
|
+
__END_DECLS
|
|
149
|
+
|
|
150
|
+
#endif /* __NW_INTERFACE_H__ */
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ip_options.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2017-2020 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_IP_OPTIONS_H__
|
|
9
|
+
#define __NW_IP_OPTIONS_H__
|
|
10
|
+
|
|
11
|
+
#ifndef __NW_INDIRECT__
|
|
12
|
+
#warning "Please include <Network/Network.h> instead of this file directly."
|
|
13
|
+
#endif // __NW_INDIRECT__
|
|
14
|
+
|
|
15
|
+
#include <Network/protocol_options.h>
|
|
16
|
+
#include <Network/parameters.h>
|
|
17
|
+
|
|
18
|
+
#include <uuid/uuid.h>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__BEGIN_DECLS
|
|
22
|
+
|
|
23
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
24
|
+
|
|
25
|
+
/*!
|
|
26
|
+
* @function nw_protocol_copy_ip_definition
|
|
27
|
+
*
|
|
28
|
+
* @abstract
|
|
29
|
+
* Access the definition of the default system protocol implementation
|
|
30
|
+
* of IP (Internet Protocol). This protocol can be used
|
|
31
|
+
* as part of a connection's protocol stack as the internet protocol.
|
|
32
|
+
*
|
|
33
|
+
* @result
|
|
34
|
+
* Returns a retained protocol definition object.
|
|
35
|
+
*/
|
|
36
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
37
|
+
NW_RETURNS_RETAINED nw_protocol_definition_t
|
|
38
|
+
nw_protocol_copy_ip_definition(void);
|
|
39
|
+
|
|
40
|
+
#pragma mark - Options
|
|
41
|
+
|
|
42
|
+
/*!
|
|
43
|
+
* @typedef nw_ip_version_t
|
|
44
|
+
* @abstract
|
|
45
|
+
* A specific version of the Internet Protocol.
|
|
46
|
+
*/
|
|
47
|
+
typedef enum {
|
|
48
|
+
/*! @const nw_ip_version_any Allow any IP version */
|
|
49
|
+
nw_ip_version_any = 0,
|
|
50
|
+
/*! @const nw_ip_version_4 Use IP version 4 (IPv4) */
|
|
51
|
+
nw_ip_version_4 = 4,
|
|
52
|
+
/*! @const nw_ip_version_6 Use IP version 6 (IPv6) */
|
|
53
|
+
nw_ip_version_6 = 6,
|
|
54
|
+
} nw_ip_version_t;
|
|
55
|
+
|
|
56
|
+
/*!
|
|
57
|
+
* @function nw_ip_options_set_version
|
|
58
|
+
*
|
|
59
|
+
* @abstract
|
|
60
|
+
* Specify a single version of the Internet Protocol to allow.
|
|
61
|
+
* Setting this value will constrain which address endpoints can
|
|
62
|
+
* be used, and will filter DNS results during connection establishment.
|
|
63
|
+
*
|
|
64
|
+
* @param options
|
|
65
|
+
* An IP protocol options object.
|
|
66
|
+
*
|
|
67
|
+
* @param version
|
|
68
|
+
* A specific, restricted IP version.
|
|
69
|
+
*/
|
|
70
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
71
|
+
void
|
|
72
|
+
nw_ip_options_set_version(nw_protocol_options_t options,
|
|
73
|
+
nw_ip_version_t version);
|
|
74
|
+
|
|
75
|
+
/*!
|
|
76
|
+
* @function nw_ip_options_set_hop_limit
|
|
77
|
+
*
|
|
78
|
+
* @abstract
|
|
79
|
+
* Configure the IP hop limit (or 'TTL' for IPv4).
|
|
80
|
+
*
|
|
81
|
+
* @param options
|
|
82
|
+
* An IP protocol options object.
|
|
83
|
+
*
|
|
84
|
+
* @param hop_limit
|
|
85
|
+
* The hop limit to set on outgoing IP packets.
|
|
86
|
+
*/
|
|
87
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
88
|
+
void
|
|
89
|
+
nw_ip_options_set_hop_limit(nw_protocol_options_t options,
|
|
90
|
+
uint8_t hop_limit);
|
|
91
|
+
|
|
92
|
+
/*!
|
|
93
|
+
* @function nw_ip_options_set_use_minimum_mtu
|
|
94
|
+
*
|
|
95
|
+
* @abstract
|
|
96
|
+
* Configure IP to use the minimum MTU value, which
|
|
97
|
+
* is 1280 bytes for IPv6. This value has no effect for
|
|
98
|
+
* IPv4.
|
|
99
|
+
*
|
|
100
|
+
* @param options
|
|
101
|
+
* An IP protocol options object.
|
|
102
|
+
*
|
|
103
|
+
* @param use_minimum_mtu
|
|
104
|
+
* A boolean indicating that the IP should use
|
|
105
|
+
* its minimum MTU value.
|
|
106
|
+
*/
|
|
107
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
108
|
+
void
|
|
109
|
+
nw_ip_options_set_use_minimum_mtu(nw_protocol_options_t options,
|
|
110
|
+
bool use_minimum_mtu);
|
|
111
|
+
|
|
112
|
+
/*!
|
|
113
|
+
* @function nw_ip_options_set_disable_fragmentation
|
|
114
|
+
*
|
|
115
|
+
* @abstract
|
|
116
|
+
* Configure IP to disable fragmentation on outgoing
|
|
117
|
+
* packets.
|
|
118
|
+
*
|
|
119
|
+
* @param options
|
|
120
|
+
* An IP protocol options object.
|
|
121
|
+
*
|
|
122
|
+
* @param disable_fragmentation
|
|
123
|
+
* A boolean indicating that the IP should use
|
|
124
|
+
* disable fragmentation on outgoing packets.
|
|
125
|
+
*/
|
|
126
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
127
|
+
void
|
|
128
|
+
nw_ip_options_set_disable_fragmentation(nw_protocol_options_t options,
|
|
129
|
+
bool disable_fragmentation);
|
|
130
|
+
|
|
131
|
+
/*!
|
|
132
|
+
* @function nw_ip_options_set_calculate_receive_time
|
|
133
|
+
*
|
|
134
|
+
* @abstract
|
|
135
|
+
* Configure IP to calculate receive time for inbound
|
|
136
|
+
* packets.
|
|
137
|
+
*
|
|
138
|
+
* @param options
|
|
139
|
+
* An IP protocol options object.
|
|
140
|
+
*
|
|
141
|
+
* @param calculate_receive_time
|
|
142
|
+
* A boolean indicating that the IP packets
|
|
143
|
+
* should mark their receive time in IP metadata.
|
|
144
|
+
*/
|
|
145
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
146
|
+
void
|
|
147
|
+
nw_ip_options_set_calculate_receive_time(nw_protocol_options_t options,
|
|
148
|
+
bool calculate_receive_time);
|
|
149
|
+
|
|
150
|
+
/*!
|
|
151
|
+
* @typedef nw_ip_local_address_preference_t
|
|
152
|
+
* @abstract
|
|
153
|
+
* Preference for local addresses selection.
|
|
154
|
+
*/
|
|
155
|
+
typedef enum {
|
|
156
|
+
/*! @const nw_ip_local_address_preference_default Use system default for address selection */
|
|
157
|
+
nw_ip_local_address_preference_default = 0,
|
|
158
|
+
/*! @const nw_ip_local_address_preference_temporary Prefer temporary (privacy) addresses */
|
|
159
|
+
nw_ip_local_address_preference_temporary = 1,
|
|
160
|
+
/*! @const nw_ip_local_address_preference_stable Prefer stable addresses */
|
|
161
|
+
nw_ip_local_address_preference_stable = 2,
|
|
162
|
+
} nw_ip_local_address_preference_t;
|
|
163
|
+
|
|
164
|
+
/*!
|
|
165
|
+
* @function nw_ip_options_set_local_address_preference
|
|
166
|
+
*
|
|
167
|
+
* @abstract
|
|
168
|
+
* Specify a preference for how to select local addresses for outbound
|
|
169
|
+
* connections.
|
|
170
|
+
*
|
|
171
|
+
* @param options
|
|
172
|
+
* An IP protocol options object.
|
|
173
|
+
*
|
|
174
|
+
* @param preference
|
|
175
|
+
* Preference for how to select local addresses.
|
|
176
|
+
*/
|
|
177
|
+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
|
|
178
|
+
void
|
|
179
|
+
nw_ip_options_set_local_address_preference(nw_protocol_options_t options,
|
|
180
|
+
nw_ip_local_address_preference_t preference);
|
|
181
|
+
|
|
182
|
+
/*!
|
|
183
|
+
* @function nw_ip_options_set_disable_multicast_loopback
|
|
184
|
+
*
|
|
185
|
+
* @abstract
|
|
186
|
+
* If a multicast packet is sent to a group to which the sending host itself
|
|
187
|
+
* belongs (on the outgoing interface), a copy of the datagram is, by default,
|
|
188
|
+
* looped back by the IP layer for local delivery.
|
|
189
|
+
* Setting the disable_multicast_loopback option disables this behavior and,
|
|
190
|
+
* if set, multicast packets will not be looped back to the sender.
|
|
191
|
+
* Only applies to multicast packets.
|
|
192
|
+
*
|
|
193
|
+
* @param options
|
|
194
|
+
* An IP protocol options object.
|
|
195
|
+
*
|
|
196
|
+
* @param disable_multicast_loopback
|
|
197
|
+
* If multicast loopback should be disabled.
|
|
198
|
+
*/
|
|
199
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
200
|
+
void
|
|
201
|
+
nw_ip_options_set_disable_multicast_loopback(nw_protocol_options_t options,
|
|
202
|
+
bool disable_multicast_loopback);
|
|
203
|
+
|
|
204
|
+
#pragma mark - Metadata
|
|
205
|
+
|
|
206
|
+
/*!
|
|
207
|
+
* @function nw_ip_create_metadata
|
|
208
|
+
*
|
|
209
|
+
* @abstract
|
|
210
|
+
* Create an instance of IP metadata that can be used
|
|
211
|
+
* to configure per-packet options when sending data
|
|
212
|
+
* on a connection.
|
|
213
|
+
*
|
|
214
|
+
* @result
|
|
215
|
+
* Returns a retained protocol metadata object.
|
|
216
|
+
*/
|
|
217
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
218
|
+
NW_RETURNS_RETAINED nw_protocol_metadata_t
|
|
219
|
+
nw_ip_create_metadata(void);
|
|
220
|
+
|
|
221
|
+
/*!
|
|
222
|
+
* @function nw_protocol_metadata_is_ip
|
|
223
|
+
*
|
|
224
|
+
* @abstract
|
|
225
|
+
* Checks if a protocol metadata object is compatible with the
|
|
226
|
+
* accessors defined in this file for the default system
|
|
227
|
+
* implementation of IP.
|
|
228
|
+
*
|
|
229
|
+
* @result
|
|
230
|
+
* Returns true if the metadata is for the default system IP,
|
|
231
|
+
* false otherwise.
|
|
232
|
+
*/
|
|
233
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
234
|
+
bool
|
|
235
|
+
nw_protocol_metadata_is_ip(nw_protocol_metadata_t metadata);
|
|
236
|
+
|
|
237
|
+
/*!
|
|
238
|
+
* @typedef nw_ip_ecn_flag_t
|
|
239
|
+
* @abstract
|
|
240
|
+
* ECN flags marked in IP headers to indicate congestion.
|
|
241
|
+
*/
|
|
242
|
+
typedef enum {
|
|
243
|
+
/*! @const nw_ip_ecn_flag_non_ect Non ECN-Capable Transport, value 0b00*/
|
|
244
|
+
nw_ip_ecn_flag_non_ect = 0,
|
|
245
|
+
/*! @const nw_ip_ecn_flag_ect_0 ECN Capable Transport (0), value 0b10 */
|
|
246
|
+
nw_ip_ecn_flag_ect_0 = 2,
|
|
247
|
+
/*! @const nw_ip_ecn_flag_ect_1 ECN Capable Transport (1), value 0b01 */
|
|
248
|
+
nw_ip_ecn_flag_ect_1 = 1,
|
|
249
|
+
/*! @const nw_ip_ecn_flag_ce Congestion Experienced, value 0b11 */
|
|
250
|
+
nw_ip_ecn_flag_ce = 3,
|
|
251
|
+
} nw_ip_ecn_flag_t;
|
|
252
|
+
|
|
253
|
+
/*!
|
|
254
|
+
* @function nw_ip_metadata_set_ecn_flag
|
|
255
|
+
*
|
|
256
|
+
* @abstract
|
|
257
|
+
* Sets ECN flags on IP metadata. This will take effect if
|
|
258
|
+
* applied to any sent content.
|
|
259
|
+
*
|
|
260
|
+
* @param metadata
|
|
261
|
+
* An IP metadata object.
|
|
262
|
+
*
|
|
263
|
+
* @param ecn_flag
|
|
264
|
+
* The ECN flag to apply to packets.
|
|
265
|
+
*/
|
|
266
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
267
|
+
void
|
|
268
|
+
nw_ip_metadata_set_ecn_flag(nw_protocol_metadata_t metadata,
|
|
269
|
+
nw_ip_ecn_flag_t ecn_flag);
|
|
270
|
+
|
|
271
|
+
/*!
|
|
272
|
+
* @function nw_ip_metadata_get_ecn_flag
|
|
273
|
+
*
|
|
274
|
+
* @abstract
|
|
275
|
+
* Gets ECN flags from IP metadata. This will be set only
|
|
276
|
+
* for metadata associated with received content.
|
|
277
|
+
*
|
|
278
|
+
* @param metadata
|
|
279
|
+
* An IP metadata object.
|
|
280
|
+
*
|
|
281
|
+
* @return
|
|
282
|
+
* Returns the ECN flag received from a packet.
|
|
283
|
+
*/
|
|
284
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
285
|
+
nw_ip_ecn_flag_t
|
|
286
|
+
nw_ip_metadata_get_ecn_flag(nw_protocol_metadata_t metadata);
|
|
287
|
+
|
|
288
|
+
/*!
|
|
289
|
+
* @function nw_ip_metadata_set_service_class
|
|
290
|
+
*
|
|
291
|
+
* @abstract
|
|
292
|
+
* Sets service class on IP metadata. This will not generally
|
|
293
|
+
* translate into TOS or Traffic Class bits unless the network
|
|
294
|
+
* explicitly supports it, but it will impact local queuing of
|
|
295
|
+
* packets.
|
|
296
|
+
*
|
|
297
|
+
* @param metadata
|
|
298
|
+
* An IP metadata object.
|
|
299
|
+
*
|
|
300
|
+
* @param service_class
|
|
301
|
+
* The service class to apply to packets.
|
|
302
|
+
*/
|
|
303
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
304
|
+
void
|
|
305
|
+
nw_ip_metadata_set_service_class(nw_protocol_metadata_t metadata,
|
|
306
|
+
nw_service_class_t service_class);
|
|
307
|
+
|
|
308
|
+
/*!
|
|
309
|
+
* @function nw_ip_metadata_get_service_class
|
|
310
|
+
*
|
|
311
|
+
* @abstract
|
|
312
|
+
* Gets service class from IP metadata. This reflects the value
|
|
313
|
+
* set using nw_ip_metadata_set_service_class. It will not
|
|
314
|
+
* be received from the network.
|
|
315
|
+
*
|
|
316
|
+
* @param metadata
|
|
317
|
+
* An IP metadata object.
|
|
318
|
+
*
|
|
319
|
+
* @return
|
|
320
|
+
* Returns the service class set on a packet.
|
|
321
|
+
*/
|
|
322
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
323
|
+
nw_service_class_t
|
|
324
|
+
nw_ip_metadata_get_service_class(nw_protocol_metadata_t metadata);
|
|
325
|
+
|
|
326
|
+
/*!
|
|
327
|
+
* @function nw_ip_metadata_get_receive_time
|
|
328
|
+
*
|
|
329
|
+
* @abstract
|
|
330
|
+
* Access the time at which a packet was received. This is
|
|
331
|
+
* useful for calculating precise timing for round-trip-time
|
|
332
|
+
* estimates. Same as clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW).
|
|
333
|
+
*
|
|
334
|
+
* The receive time will be 0 unless timestamps have been enabled
|
|
335
|
+
* using nw_ip_options_set_calculate_receive_time().
|
|
336
|
+
*
|
|
337
|
+
* @param metadata
|
|
338
|
+
* An IP metadata object.
|
|
339
|
+
*
|
|
340
|
+
* @return
|
|
341
|
+
* Returns the time that the packet was received.
|
|
342
|
+
*/
|
|
343
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
344
|
+
uint64_t
|
|
345
|
+
nw_ip_metadata_get_receive_time(nw_protocol_metadata_t metadata);
|
|
346
|
+
|
|
347
|
+
NW_ASSUME_NONNULL_END
|
|
348
|
+
|
|
349
|
+
__END_DECLS
|
|
350
|
+
|
|
351
|
+
#endif // __NW_IP_OPTIONS_H__
|