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,392 @@
|
|
|
1
|
+
//
|
|
2
|
+
// path.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2017-2026 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_PATH_H__
|
|
9
|
+
#define __NW_PATH_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
|
+
#include <Network/interface.h>
|
|
17
|
+
#include <Network/nw_object.h>
|
|
18
|
+
|
|
19
|
+
#include <stdbool.h>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
__BEGIN_DECLS
|
|
23
|
+
|
|
24
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
25
|
+
|
|
26
|
+
/*!
|
|
27
|
+
* @typedef nw_path_t
|
|
28
|
+
* @abstract
|
|
29
|
+
* A Network Path object represents a snapshot of network path state. This state
|
|
30
|
+
* represents the known information about the local interface and routes that may
|
|
31
|
+
* be used to send and receive data. If the network path for a connection changes
|
|
32
|
+
* due to interface characteristics, addresses, or other attributes, a new nw_path_t
|
|
33
|
+
* object will be generated. Note that the differences in the path attributes may not
|
|
34
|
+
* be visible through public accessors, and these changes should be treated merely
|
|
35
|
+
* as an indication that something about the network has changed.
|
|
36
|
+
*
|
|
37
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
38
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
39
|
+
*/
|
|
40
|
+
#ifndef NW_PATH_IMPL
|
|
41
|
+
NW_OBJECT_DECL(nw_path);
|
|
42
|
+
#endif // NW_PATH_IMPL
|
|
43
|
+
|
|
44
|
+
/*!
|
|
45
|
+
* @typedef nw_path_status_t
|
|
46
|
+
* @abstract
|
|
47
|
+
* A network path status indicates if there is a usable route available upon which to
|
|
48
|
+
* send and receive data.
|
|
49
|
+
*/
|
|
50
|
+
typedef enum {
|
|
51
|
+
/*! @const nw_path_status_invalid The path is not valid */
|
|
52
|
+
nw_path_status_invalid = 0,
|
|
53
|
+
/*! @const nw_path_status_satisfied The path has a usable route upon which to send and receive data */
|
|
54
|
+
nw_path_status_satisfied = 1,
|
|
55
|
+
/*! @const nw_path_status_unsatisfied The path does not have a usable route. This may be due to a network interface being down, or due to system policy. */
|
|
56
|
+
nw_path_status_unsatisfied = 2,
|
|
57
|
+
/*! @const nw_path_status_satisfiable The path does not currently have a usable route, but a connection attempt will trigger network attachment */
|
|
58
|
+
nw_path_status_satisfiable = 3,
|
|
59
|
+
} nw_path_status_t;
|
|
60
|
+
|
|
61
|
+
/*!
|
|
62
|
+
* @function nw_path_get_status
|
|
63
|
+
*
|
|
64
|
+
* @abstract
|
|
65
|
+
* Retrieves the status of a path. The status of a specific path object will never
|
|
66
|
+
* change, as the path object itself is static. If there is a network change, the
|
|
67
|
+
* object that generated the path object will generate a new path object.
|
|
68
|
+
*
|
|
69
|
+
* @param path
|
|
70
|
+
* The path object to check.
|
|
71
|
+
*
|
|
72
|
+
* @result
|
|
73
|
+
* Returns the status of the path, or nw_path_status_invalid if the object is NULL.
|
|
74
|
+
*/
|
|
75
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
76
|
+
nw_path_status_t
|
|
77
|
+
nw_path_get_status(nw_path_t path);
|
|
78
|
+
|
|
79
|
+
/*!
|
|
80
|
+
* @typedef nw_path_unsatisfied_reason_t
|
|
81
|
+
* @abstract
|
|
82
|
+
* A network path unsatisfied reason may indicate the reason the path is currently unsatisfied for some conditions.
|
|
83
|
+
*/
|
|
84
|
+
typedef enum {
|
|
85
|
+
/*! @const nw_path_unsatisfied_reason_not_available No reason is given */
|
|
86
|
+
nw_path_unsatisfied_reason_not_available = 0,
|
|
87
|
+
/*! @const nw_path_unsatisfied_reason_cellular_denied The user has disabled cellular */
|
|
88
|
+
nw_path_unsatisfied_reason_cellular_denied = 1,
|
|
89
|
+
/*! @const nw_path_unsatisfied_reason_wifi_denied The user has disabled Wi-Fi */
|
|
90
|
+
nw_path_unsatisfied_reason_wifi_denied = 2,
|
|
91
|
+
/*! @const nw_path_unsatisfied_reason_local_network_denied The user has disabled local network access */
|
|
92
|
+
nw_path_unsatisfied_reason_local_network_denied = 3,
|
|
93
|
+
/*! @const nw_path_unsatisfied_reason_vpn_inactive A required VPN is not active */
|
|
94
|
+
nw_path_unsatisfied_reason_vpn_inactive API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0)) = 4,
|
|
95
|
+
} nw_path_unsatisfied_reason_t;
|
|
96
|
+
|
|
97
|
+
/*!
|
|
98
|
+
* @function nw_path_get_unsatisfied_reason
|
|
99
|
+
*
|
|
100
|
+
* @abstract
|
|
101
|
+
* Retrieves a reason the path is not satisfied. In some cases, the reason helps to
|
|
102
|
+
* determine why the path is not satisfied. While the path may be unsatisfied for more
|
|
103
|
+
* than one reason, only the first reason will be given. In many cases, the path may be
|
|
104
|
+
* unsatisfied with no reason available.
|
|
105
|
+
*
|
|
106
|
+
* @param path
|
|
107
|
+
* The path object to check.
|
|
108
|
+
*
|
|
109
|
+
* @result
|
|
110
|
+
* Returns a reason the path is unsatisfied or nw_path_unsatisfied_reason_not_available if a reason is not available.
|
|
111
|
+
*/
|
|
112
|
+
API_AVAILABLE(macos(11.0), ios(14.2), watchos(7.1), tvos(14.2))
|
|
113
|
+
nw_path_unsatisfied_reason_t
|
|
114
|
+
nw_path_get_unsatisfied_reason(nw_path_t path);
|
|
115
|
+
|
|
116
|
+
#ifdef __BLOCKS__
|
|
117
|
+
|
|
118
|
+
typedef bool (^nw_path_enumerate_interfaces_block_t)(nw_interface_t interface);
|
|
119
|
+
|
|
120
|
+
/*!
|
|
121
|
+
* @function nw_path_enumerate_interfaces
|
|
122
|
+
*
|
|
123
|
+
* @abstract
|
|
124
|
+
* List all interfaces associated with the path.
|
|
125
|
+
*
|
|
126
|
+
* @param path
|
|
127
|
+
* The path object to check.
|
|
128
|
+
*
|
|
129
|
+
* @param enumerate_block
|
|
130
|
+
* A block that will return the interfaces associated with the path. Returning
|
|
131
|
+
* true from the block will continue to enumerate, and returning false will stop
|
|
132
|
+
* enumerating.
|
|
133
|
+
*/
|
|
134
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
135
|
+
void
|
|
136
|
+
nw_path_enumerate_interfaces(nw_path_t path,
|
|
137
|
+
NW_NOESCAPE nw_path_enumerate_interfaces_block_t enumerate_block);
|
|
138
|
+
|
|
139
|
+
#endif // __BLOCKS__
|
|
140
|
+
|
|
141
|
+
/*!
|
|
142
|
+
* @function nw_path_is_equal
|
|
143
|
+
*
|
|
144
|
+
* @abstract
|
|
145
|
+
* Compares two network path objects and checks if their content is equal.
|
|
146
|
+
* If they are not equal, they represent two different network states.
|
|
147
|
+
*
|
|
148
|
+
* @param path
|
|
149
|
+
* The first path object to compare.
|
|
150
|
+
*
|
|
151
|
+
* @param other_path
|
|
152
|
+
* The second path object to compare.
|
|
153
|
+
*
|
|
154
|
+
* @result
|
|
155
|
+
* Returns true if the paths are equivalent, or false if there is any difference
|
|
156
|
+
* between the paths.
|
|
157
|
+
*/
|
|
158
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
159
|
+
bool
|
|
160
|
+
nw_path_is_equal(nw_path_t path, nw_path_t other_path);
|
|
161
|
+
|
|
162
|
+
/*!
|
|
163
|
+
* @function nw_path_is_expensive
|
|
164
|
+
*
|
|
165
|
+
* @abstract
|
|
166
|
+
* Checks if the path uses any network interfaces that are considered expensive
|
|
167
|
+
* to the user, such as, but not limited to, a cellular network.
|
|
168
|
+
*
|
|
169
|
+
* @param path
|
|
170
|
+
* The path object to check.
|
|
171
|
+
*
|
|
172
|
+
* @result
|
|
173
|
+
* Returns true if the path uses any network interface that is considered expensive,
|
|
174
|
+
* false otherwise.
|
|
175
|
+
*/
|
|
176
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
177
|
+
bool
|
|
178
|
+
nw_path_is_expensive(nw_path_t path);
|
|
179
|
+
|
|
180
|
+
/*!
|
|
181
|
+
* @function nw_path_is_constrained
|
|
182
|
+
*
|
|
183
|
+
* @abstract
|
|
184
|
+
* Checks if the path uses any network interfaces that are considered constrained
|
|
185
|
+
* to the user.
|
|
186
|
+
*
|
|
187
|
+
* @param path
|
|
188
|
+
* The path object to check.
|
|
189
|
+
*
|
|
190
|
+
* @result
|
|
191
|
+
* Returns true if the path uses any network interface that is considered constrained,
|
|
192
|
+
* false otherwise.
|
|
193
|
+
*/
|
|
194
|
+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
|
|
195
|
+
bool
|
|
196
|
+
nw_path_is_constrained(nw_path_t path);
|
|
197
|
+
|
|
198
|
+
/*!
|
|
199
|
+
* @function nw_path_is_ultra_constrained
|
|
200
|
+
*
|
|
201
|
+
* @abstract
|
|
202
|
+
* Checks if the path uses any network interfaces that are considered ultra-constrained.
|
|
203
|
+
*
|
|
204
|
+
* @param path
|
|
205
|
+
* The path object to check.
|
|
206
|
+
*
|
|
207
|
+
* @result
|
|
208
|
+
* Returns true if the path uses any network interface that is considered ultra-constrained,
|
|
209
|
+
* false otherwise.
|
|
210
|
+
*/
|
|
211
|
+
API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0))
|
|
212
|
+
bool
|
|
213
|
+
nw_path_is_ultra_constrained(nw_path_t path);
|
|
214
|
+
|
|
215
|
+
/*!
|
|
216
|
+
* @function nw_path_has_ipv4
|
|
217
|
+
*
|
|
218
|
+
* @abstract
|
|
219
|
+
* Checks if the path uses a network interface that supports IPv4 connectivity.
|
|
220
|
+
*
|
|
221
|
+
* @param path
|
|
222
|
+
* The path object to check.
|
|
223
|
+
*
|
|
224
|
+
* @result
|
|
225
|
+
* Returns true if the path uses a network interface that supports IPv4,
|
|
226
|
+
* false otherwise.
|
|
227
|
+
*/
|
|
228
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
229
|
+
bool
|
|
230
|
+
nw_path_has_ipv4(nw_path_t path);
|
|
231
|
+
|
|
232
|
+
/*!
|
|
233
|
+
* @function nw_path_has_ipv6
|
|
234
|
+
*
|
|
235
|
+
* @abstract
|
|
236
|
+
* Checks if the path uses a network interface that supports IPv6 connectivity.
|
|
237
|
+
*
|
|
238
|
+
* @param path
|
|
239
|
+
* The path object to check.
|
|
240
|
+
*
|
|
241
|
+
* @result
|
|
242
|
+
* Returns true if the path uses a network interface that supports IPv6,
|
|
243
|
+
* false otherwise.
|
|
244
|
+
*/
|
|
245
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
246
|
+
bool
|
|
247
|
+
nw_path_has_ipv6(nw_path_t path);
|
|
248
|
+
|
|
249
|
+
/*!
|
|
250
|
+
* @function nw_path_has_dns
|
|
251
|
+
*
|
|
252
|
+
* @abstract
|
|
253
|
+
* Checks if the path has a DNS server configuration set.
|
|
254
|
+
*
|
|
255
|
+
* @param path
|
|
256
|
+
* The path object to check.
|
|
257
|
+
*
|
|
258
|
+
* @result
|
|
259
|
+
* Returns true if the path has a DNS server configuration set,
|
|
260
|
+
* false otherwise.
|
|
261
|
+
*/
|
|
262
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
263
|
+
bool
|
|
264
|
+
nw_path_has_dns(nw_path_t path);
|
|
265
|
+
|
|
266
|
+
/*!
|
|
267
|
+
* @function nw_path_uses_interface_type
|
|
268
|
+
*
|
|
269
|
+
* @abstract
|
|
270
|
+
* Checks if the path uses a network interface with the specified type.
|
|
271
|
+
*
|
|
272
|
+
* @param path
|
|
273
|
+
* The path object to check.
|
|
274
|
+
*
|
|
275
|
+
* @result
|
|
276
|
+
* Returns true if the path uses any network interface with the specified type,
|
|
277
|
+
* false otherwise.
|
|
278
|
+
*/
|
|
279
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
280
|
+
bool
|
|
281
|
+
nw_path_uses_interface_type(nw_path_t path,
|
|
282
|
+
nw_interface_type_t interface_type);
|
|
283
|
+
|
|
284
|
+
/*!
|
|
285
|
+
* @function nw_path_copy_effective_local_endpoint
|
|
286
|
+
*
|
|
287
|
+
* @abstract
|
|
288
|
+
* Retrieve the local endpoint that is being used, if present. If this path
|
|
289
|
+
* is the path from an nw_connection_t, it represents the address that data
|
|
290
|
+
* is sent from.
|
|
291
|
+
*
|
|
292
|
+
* @param path
|
|
293
|
+
* The path object to check.
|
|
294
|
+
*
|
|
295
|
+
* @result
|
|
296
|
+
* Returns an endpoint that is assigned as the local endpoint for this path,
|
|
297
|
+
* or NULL if the path does not have a fixed local endpoint.
|
|
298
|
+
*/
|
|
299
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
300
|
+
NW_RETURNS_RETAINED _Nullable nw_endpoint_t
|
|
301
|
+
nw_path_copy_effective_local_endpoint(nw_path_t path);
|
|
302
|
+
|
|
303
|
+
/*!
|
|
304
|
+
* @function nw_path_copy_effective_remote_endpoint
|
|
305
|
+
*
|
|
306
|
+
* @abstract
|
|
307
|
+
* Retrieve the remote endpoint that is being used, if present. If this path
|
|
308
|
+
* is the path from an nw_connection_t, it represents the address that data
|
|
309
|
+
* is sent to.
|
|
310
|
+
*
|
|
311
|
+
* @param path
|
|
312
|
+
* The path object to check.
|
|
313
|
+
*
|
|
314
|
+
* @result
|
|
315
|
+
* Returns an endpoint that is assigned as the remote endpoint for this path,
|
|
316
|
+
* or NULL if the path does not have a fixed remote endpoint.
|
|
317
|
+
*/
|
|
318
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
319
|
+
NW_RETURNS_RETAINED _Nullable nw_endpoint_t
|
|
320
|
+
nw_path_copy_effective_remote_endpoint(nw_path_t path);
|
|
321
|
+
|
|
322
|
+
#ifdef __BLOCKS__
|
|
323
|
+
|
|
324
|
+
typedef bool (^nw_path_enumerate_gateways_block_t)(nw_endpoint_t gateway);
|
|
325
|
+
|
|
326
|
+
/*!
|
|
327
|
+
* @function nw_path_enumerate_gateways
|
|
328
|
+
*
|
|
329
|
+
* @abstract
|
|
330
|
+
* List the IP addresses of the routers acting as the gateways for the path.
|
|
331
|
+
*
|
|
332
|
+
* @param path
|
|
333
|
+
* The path object to check.
|
|
334
|
+
*
|
|
335
|
+
* @param enumerate_block
|
|
336
|
+
* A block that will return the gateways associated with the path. Returning
|
|
337
|
+
* true from the block will continue to enumerate, and returning false will stop
|
|
338
|
+
* enumerating.
|
|
339
|
+
*/
|
|
340
|
+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
|
|
341
|
+
void
|
|
342
|
+
nw_path_enumerate_gateways(nw_path_t path,
|
|
343
|
+
NW_NOESCAPE nw_path_enumerate_gateways_block_t enumerate_block);
|
|
344
|
+
|
|
345
|
+
#endif // __BLOCKS__
|
|
346
|
+
|
|
347
|
+
/*!
|
|
348
|
+
* @typedef nw_link_quality_t
|
|
349
|
+
* @abstract
|
|
350
|
+
* Link quality measurement is a representation of the expected capabilities of the link layer network
|
|
351
|
+
* attachment. Use this value to tune initial values for algorithms that can scale with the
|
|
352
|
+
* capabilities of the network. Do not use this value to gate connection attempts or to override
|
|
353
|
+
* adjustments that would be made based on actual network performance.
|
|
354
|
+
*/
|
|
355
|
+
typedef enum: uint8_t {
|
|
356
|
+
/*! @const nw_link_quality_unknown No link quality measurement is available */
|
|
357
|
+
nw_link_quality_unknown = 0,
|
|
358
|
+
/*! @const nw_link_quality_minimal Link quality is minimal */
|
|
359
|
+
nw_link_quality_minimal = 10,
|
|
360
|
+
/*! @const nw_link_quality_moderate Link quality is moderate */
|
|
361
|
+
nw_link_quality_moderate = 20,
|
|
362
|
+
/*! @const nw_link_quality_good Link quality is good */
|
|
363
|
+
nw_link_quality_good = 30
|
|
364
|
+
} nw_link_quality_t;
|
|
365
|
+
|
|
366
|
+
/*!
|
|
367
|
+
* @function nw_path_get_link_quality
|
|
368
|
+
*
|
|
369
|
+
* @abstract
|
|
370
|
+
* Fetches the link quality measurement for the interface.
|
|
371
|
+
* Link quality measurement is a representation of the expected capabilities of the link layer network
|
|
372
|
+
* attachment. Use this value to tune initial values for algorithms that can scale with the
|
|
373
|
+
* capabilities of the network. Do not use this value to gate connection attempts or to override
|
|
374
|
+
* adjustments that would be made based on actual network performance.
|
|
375
|
+
*
|
|
376
|
+
* @param path
|
|
377
|
+
* The path object to check.
|
|
378
|
+
*
|
|
379
|
+
* @result
|
|
380
|
+
* Returns the link quality measurement of the link layer network attachment.
|
|
381
|
+
* Returns nw_link_quality_unknown if there is no measurement available.
|
|
382
|
+
*/
|
|
383
|
+
API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0))
|
|
384
|
+
nw_link_quality_t
|
|
385
|
+
nw_path_get_link_quality(nw_path_t path);
|
|
386
|
+
|
|
387
|
+
NW_ASSUME_NONNULL_END
|
|
388
|
+
|
|
389
|
+
__END_DECLS
|
|
390
|
+
|
|
391
|
+
#endif /* defined(__NW_PATH_H__) */
|
|
392
|
+
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
//
|
|
2
|
+
// path_monitor.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2017-2020 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_PATH_MONITOR_H__
|
|
9
|
+
#define __NW_PATH_MONITOR_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/path.h>
|
|
16
|
+
#include <Network/interface.h>
|
|
17
|
+
#include <Network/nw_object.h>
|
|
18
|
+
|
|
19
|
+
#include <dispatch/dispatch.h>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
__BEGIN_DECLS
|
|
23
|
+
|
|
24
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
25
|
+
|
|
26
|
+
/*!
|
|
27
|
+
* @typedef nw_path_monitor_t
|
|
28
|
+
* @abstract
|
|
29
|
+
* The Network Path Monitor allows the caller to fetch the current global path (or
|
|
30
|
+
* a path restricted to a specific network interface type). The path is delivered
|
|
31
|
+
* in a block that is called every time the network path changes.
|
|
32
|
+
*
|
|
33
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
34
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
35
|
+
*/
|
|
36
|
+
#ifndef NW_PATH_MONITOR_IMPL
|
|
37
|
+
NW_OBJECT_DECL(nw_path_monitor);
|
|
38
|
+
#endif // NW_PATH_MONITOR_IMPL
|
|
39
|
+
|
|
40
|
+
/*!
|
|
41
|
+
* @function nw_path_monitor_create
|
|
42
|
+
*
|
|
43
|
+
* @abstract
|
|
44
|
+
* Create a default path monitor, that will allow the enumeration of all available
|
|
45
|
+
* interfaces on the system.
|
|
46
|
+
*
|
|
47
|
+
* @result
|
|
48
|
+
* Returns an allocated nw_path_monitor_t object on success.
|
|
49
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
50
|
+
* These objects support ARC.
|
|
51
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
52
|
+
*/
|
|
53
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
54
|
+
NW_RETURNS_RETAINED nw_path_monitor_t
|
|
55
|
+
nw_path_monitor_create(void);
|
|
56
|
+
|
|
57
|
+
/*!
|
|
58
|
+
* @function nw_path_monitor_create_with_type
|
|
59
|
+
*
|
|
60
|
+
* @abstract
|
|
61
|
+
* Create a path monitor specific to an interface type, that will allow the enumeration
|
|
62
|
+
* of any interface that matches the type on the system.
|
|
63
|
+
*
|
|
64
|
+
* @param required_interface_type
|
|
65
|
+
* An interface type that will filter any results that the path monitor returns.
|
|
66
|
+
*
|
|
67
|
+
* @result
|
|
68
|
+
* Returns an allocated nw_path_monitor_t object on success.
|
|
69
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
70
|
+
* These objects support ARC.
|
|
71
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
72
|
+
*/
|
|
73
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
74
|
+
NW_RETURNS_RETAINED nw_path_monitor_t
|
|
75
|
+
nw_path_monitor_create_with_type(nw_interface_type_t required_interface_type);
|
|
76
|
+
|
|
77
|
+
/*!
|
|
78
|
+
* @function nw_path_monitor_create_for_ethernet_channel
|
|
79
|
+
*
|
|
80
|
+
* @abstract
|
|
81
|
+
* Create a path monitor that enumerates all interfaces that support
|
|
82
|
+
* Ethernet channel.
|
|
83
|
+
*
|
|
84
|
+
* @result
|
|
85
|
+
* Returns an allocated nw_path_monitor_t object on success.
|
|
86
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
87
|
+
* These objects support ARC.
|
|
88
|
+
* Returns NULL on failure.
|
|
89
|
+
*/
|
|
90
|
+
API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
91
|
+
NW_RETURNS_RETAINED nw_path_monitor_t
|
|
92
|
+
nw_path_monitor_create_for_ethernet_channel(void);
|
|
93
|
+
|
|
94
|
+
/*!
|
|
95
|
+
* @function nw_path_monitor_prohibit_interface_type
|
|
96
|
+
*
|
|
97
|
+
* @abstract
|
|
98
|
+
* Prohibit this path monitor from using the provided network interface type.
|
|
99
|
+
* Call before calling nw_path_monitor_start.
|
|
100
|
+
*
|
|
101
|
+
* @param monitor
|
|
102
|
+
* The path monitor object.
|
|
103
|
+
*
|
|
104
|
+
* @param interface_type
|
|
105
|
+
* The interface type to prohibit for the path monitor.
|
|
106
|
+
*/
|
|
107
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
108
|
+
void
|
|
109
|
+
nw_path_monitor_prohibit_interface_type(nw_path_monitor_t monitor,
|
|
110
|
+
nw_interface_type_t interface_type);
|
|
111
|
+
|
|
112
|
+
#ifdef __BLOCKS__
|
|
113
|
+
|
|
114
|
+
/*!
|
|
115
|
+
* @typedef nw_path_monitor_cancel_handler_t
|
|
116
|
+
* @abstract
|
|
117
|
+
* A block handler to be called when a path monitor is cancelled. This
|
|
118
|
+
* is used to allow clients to release any objects they have retained in
|
|
119
|
+
* association with the path monitor.
|
|
120
|
+
*/
|
|
121
|
+
typedef void (^nw_path_monitor_cancel_handler_t)(void);
|
|
122
|
+
|
|
123
|
+
/*!
|
|
124
|
+
* @function nw_path_monitor_set_cancel_handler
|
|
125
|
+
* @abstract
|
|
126
|
+
* Set a handler to be called on the queue provided to nw_path_monitor_set_queue
|
|
127
|
+
* once cancellation has completed. Once the cancel handler has been called, the
|
|
128
|
+
* update handler will not fire again.
|
|
129
|
+
*
|
|
130
|
+
* @param monitor
|
|
131
|
+
* The path monitor object.
|
|
132
|
+
*
|
|
133
|
+
* @param cancel_handler
|
|
134
|
+
* The block to call upon cancellation. Pass NULL to remove the cancel handler.
|
|
135
|
+
*/
|
|
136
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
137
|
+
void
|
|
138
|
+
nw_path_monitor_set_cancel_handler(nw_path_monitor_t monitor,
|
|
139
|
+
nw_path_monitor_cancel_handler_t cancel_handler);
|
|
140
|
+
|
|
141
|
+
/*!
|
|
142
|
+
* @typedef nw_path_monitor_update_handler_t
|
|
143
|
+
* @abstract
|
|
144
|
+
* A block handler to be called whenever a path monitor has a new snapshot.
|
|
145
|
+
* This will be called one or more times after calling nw_path_monitor_start.
|
|
146
|
+
*/
|
|
147
|
+
typedef void (^nw_path_monitor_update_handler_t) (nw_path_t path);
|
|
148
|
+
|
|
149
|
+
/*!
|
|
150
|
+
* @function nw_path_monitor_set_update_handler
|
|
151
|
+
* @abstract
|
|
152
|
+
* Sets the client update handler. This block will be called with the
|
|
153
|
+
* current path when start is called and any time the path changes.
|
|
154
|
+
*
|
|
155
|
+
* @param monitor
|
|
156
|
+
* The path monitor object.
|
|
157
|
+
*
|
|
158
|
+
* @param update_handler
|
|
159
|
+
* The block to call when the path changes.
|
|
160
|
+
*/
|
|
161
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
162
|
+
void
|
|
163
|
+
nw_path_monitor_set_update_handler(nw_path_monitor_t monitor,
|
|
164
|
+
nw_path_monitor_update_handler_t update_handler);
|
|
165
|
+
|
|
166
|
+
#endif // __BLOCKS__
|
|
167
|
+
|
|
168
|
+
/*!
|
|
169
|
+
* @function nw_path_monitor_set_queue
|
|
170
|
+
* @abstract
|
|
171
|
+
* Sets the client update queue. All blocks will be scheduled on
|
|
172
|
+
* this queue. Call before calling nw_path_monitor_start.
|
|
173
|
+
*
|
|
174
|
+
* @param monitor
|
|
175
|
+
* The path monitor object.
|
|
176
|
+
*
|
|
177
|
+
* @param queue
|
|
178
|
+
* The dispatch queue on which to call the update and cancel handlers.
|
|
179
|
+
*/
|
|
180
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
181
|
+
void
|
|
182
|
+
nw_path_monitor_set_queue(nw_path_monitor_t monitor,
|
|
183
|
+
dispatch_queue_t queue);
|
|
184
|
+
|
|
185
|
+
/*!
|
|
186
|
+
* @function nw_path_monitor_start
|
|
187
|
+
* @abstract
|
|
188
|
+
* Starts the path monitor.
|
|
189
|
+
*
|
|
190
|
+
* @param monitor
|
|
191
|
+
* The path monitor object.
|
|
192
|
+
*/
|
|
193
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
194
|
+
void
|
|
195
|
+
nw_path_monitor_start(nw_path_monitor_t monitor);
|
|
196
|
+
|
|
197
|
+
/*!
|
|
198
|
+
* @function nw_path_monitor_cancel
|
|
199
|
+
*
|
|
200
|
+
* @abstract
|
|
201
|
+
* Cancel the path monitor.
|
|
202
|
+
*
|
|
203
|
+
* @param monitor
|
|
204
|
+
* The path monitor object.
|
|
205
|
+
*/
|
|
206
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
207
|
+
void
|
|
208
|
+
nw_path_monitor_cancel(nw_path_monitor_t monitor);
|
|
209
|
+
|
|
210
|
+
NW_ASSUME_NONNULL_END
|
|
211
|
+
|
|
212
|
+
__END_DECLS
|
|
213
|
+
|
|
214
|
+
#endif /* defined(__NW_PATH_MONITOR_H__) */
|
|
215
|
+
|
|
216
|
+
|