peachsim 0.1.1728 → 0.1.1744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/cli/app-catalog.ts +47 -23
- package/cli/app-fonts.ts +19 -1
- package/cli/command-registry.ts +3 -0
- package/cli/commands/control.ts +68 -16
- package/cli/commands/coverage-swift.ts +112 -4
- package/cli/commands/device.ts +3 -1
- package/cli/commands/doctor.ts +1 -4
- package/cli/commands/inspect/settling.ts +6 -1
- package/cli/commands/inspect/wait-ready.ts +22 -2
- package/cli/commands/package.ts +33 -21
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +41 -9
- package/cli/commands/swift.ts +1 -1
- package/cli/current-sim.ts +27 -0
- package/cli/drivers/linux-browser-libs.lock.json +323 -1
- package/cli/drivers/linux-browser-libs.ts +8 -6
- package/cli/drivers/playwright.ts +5 -1
- package/cli/internal-child.ts +11 -1
- package/cli/main.ts +6 -0
- package/cli/native-input.ts +1 -7
- package/cli/outbound-endpoints.ts +9 -1
- package/cli/packaged-app-launcher.ts +3 -1
- package/cli/scene-video.ts +28 -7
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +18 -5
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +9932 -4561
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +30 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6886 -3303
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +7 -2
- package/dist-lib/host/bridge-host.cjs +8513 -3085
- package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +6 -3
- package/dist-lib/index.cjs +175 -80
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +209 -32
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +146 -76
- package/dist-lib/native-app-identity-project.cjs +76 -39
- package/dist-lib/native-app-identity-project.mjs +76 -39
- package/dist-lib/native-app-identity.cjs +10 -3
- package/dist-lib/native-app-identity.mjs +10 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +5 -2
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -23
- package/dist-lib/public-origins-lib.json +138 -80
- package/dist-lib/react-native-host-modules.cjs +5 -2
- package/dist-lib/react-native-host-modules.mjs +5 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +4 -1
- package/dist-lib/sdk.mjs +4 -1
- package/dist-lib/skills.cjs +41126 -36493
- package/dist-lib/swift-compile.cjs +2103 -444
- package/dist-lib/swift-compile.mjs +2025 -369
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +84 -24
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +6094 -2687
- package/dist-lib/vite.cjs +32 -10
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
- package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
- package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
- package/sdk/ios/usr/include/dns_sd.h +3616 -0
- package/sdk/ios/usr/include/dnssd.modulemap +4 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/usr/include/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -265
- package/skills/peach-debug/references/accessibility.md +37 -73
- package/skills/peach-debug/references/commands.md +2 -2
- package/skills/peach-debug/references/events.md +74 -0
- package/skills/peach-perf/SKILL.md +64 -402
- package/skills/peach-perf/references/presentation.md +46 -0
- package/skills/peach-perf/references/profiling.md +93 -0
- package/skills/peach-perf/references/render-counters.md +57 -0
- package/skills/peach-setup/SKILL.md +66 -217
- package/skills/peach-setup/references/native-config.md +35 -0
- package/skills/peach-setup/references/reporting.md +28 -0
- package/skills/peach-test/SKILL.md +68 -285
- package/skills/peach-test/references/detox.md +69 -0
- package/skills/peach-test/references/maestro.md +95 -0
- package/skills/peach-visual/SKILL.md +53 -106
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/appPackageContract.ts +14 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +152 -60
- package/src/cli-runtime.ts +3 -0
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +10 -3
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-native-workspace.ts +211 -52
- package/src/expo-swift-host.ts +149 -123
- package/src/expo-swift-ready.ts +5 -1
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +21 -2
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +6 -1
- package/src/host/bridge-host.ts +5 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/host/websocket-proxy.ts +7 -2
- package/src/kotlin-host.ts +204 -30
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +7 -0
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +261 -261
- package/src/nitro-adapter.ts +118 -50
- package/src/nitro-bundle.ts +134 -96
- package/src/nitro-compile.ts +16 -6
- package/src/nitro-dependencies.ts +43 -28
- package/src/nitro-source.ts +142 -30
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +68 -21
- package/src/react-bridge-importers.ts +1 -0
- package/src/react-native-bridge-modules.ts +2 -0
- package/src/react-native-host-modules.ts +4 -1
- package/src/settingsContract.ts +37 -1
- package/src/storageSnapshotContract.ts +29 -81
- package/src/swift-compile.ts +315 -117
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +19 -13
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +18 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +51 -35
- package/src/swift-link-roots.ts +45 -18
- package/src/swift-objc-compile.ts +78 -2
- package/src/swift-objc-standin.ts +3 -0
- package/src/swift-shared-sdk.ts +85 -1
- package/src/swift-standin-emit.ts +6 -1
- package/src/swift-standins.ts +403 -19
- package/src/swift-submit.ts +17 -1
- package/src/swift-toolchain.ts +98 -23
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +82 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +15 -3
- package/src/vite-plugin.ts +82 -23
- package/src/wasm-optimize.ts +34 -0
- package/src/worker-system-chunks.ts +3 -3
- package/src/xcode-project.ts +52 -0
- package/src/xcode-target-members.ts +12 -1
|
@@ -0,0 +1,1205 @@
|
|
|
1
|
+
//
|
|
2
|
+
// parameters.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014-2021, 2024 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_PARAMETERS_H__
|
|
9
|
+
#define __NW_PARAMETERS_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/interface.h>
|
|
17
|
+
#include <Network/endpoint.h>
|
|
18
|
+
#include <Network/privacy_context.h>
|
|
19
|
+
#include <Network/nw_object.h>
|
|
20
|
+
|
|
21
|
+
#include <stdint.h>
|
|
22
|
+
#include <stdbool.h>
|
|
23
|
+
#include <sys/socket.h>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
__BEGIN_DECLS
|
|
27
|
+
|
|
28
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
29
|
+
|
|
30
|
+
/*!
|
|
31
|
+
* @typedef nw_parameters_t
|
|
32
|
+
* @abstract
|
|
33
|
+
* A Network Parameters object contains the parameters necessary to create
|
|
34
|
+
* a network connection or listener. Parameters include any preferences for
|
|
35
|
+
* network paths (such as required, prohibited, and preferred networks, and local
|
|
36
|
+
* endpoint requirements); preferences for data transfer and quality of service;
|
|
37
|
+
* and the protocols to be used for a connection along with any protocol-specific
|
|
38
|
+
* options.
|
|
39
|
+
*
|
|
40
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
41
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
42
|
+
*/
|
|
43
|
+
#ifndef NW_PARAMETERS_IMPL
|
|
44
|
+
NW_OBJECT_DECL(nw_parameters);
|
|
45
|
+
#endif // NW_PARAMETERS_IMPL
|
|
46
|
+
|
|
47
|
+
/*!
|
|
48
|
+
* @typedef nw_protocol_stack_t
|
|
49
|
+
* @abstract
|
|
50
|
+
* A Network Protocol Stack contains a list of protocols to use for a connection.
|
|
51
|
+
* The members of the protocol stack are nw_protocol_options_t objects, each
|
|
52
|
+
* defining which protocol to use within the stack along with any protocol-specific
|
|
53
|
+
* options. Each stack includes an array of application-level protocols, a single
|
|
54
|
+
* transport-level protocol, and an optional internet-level protocol. If the internet-
|
|
55
|
+
* level protocol is not specified, any available and applicable IP address family
|
|
56
|
+
* may be used.
|
|
57
|
+
*
|
|
58
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
59
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
60
|
+
*/
|
|
61
|
+
#ifndef NW_PROTOCOL_STACK_IMPL
|
|
62
|
+
NW_OBJECT_DECL(nw_protocol_stack);
|
|
63
|
+
#endif // NW_PROTOCOL_STACK_IMPL
|
|
64
|
+
|
|
65
|
+
#pragma mark - Initializers
|
|
66
|
+
|
|
67
|
+
#ifdef __BLOCKS__
|
|
68
|
+
|
|
69
|
+
typedef void (^nw_parameters_configure_protocol_block_t)(nw_protocol_options_t options);
|
|
70
|
+
|
|
71
|
+
#define NW_PARAMETERS_CONFIGURE_PROTOCOL_TYPE_DECL(name) \
|
|
72
|
+
extern const nw_parameters_configure_protocol_block_t _nw_parameters_configure_protocol_##name
|
|
73
|
+
|
|
74
|
+
#define NW_PARAMETERS_DEFAULT_CONFIGURATION (_nw_parameters_configure_protocol_default_configuration)
|
|
75
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
76
|
+
NW_PARAMETERS_CONFIGURE_PROTOCOL_TYPE_DECL(default_configuration);
|
|
77
|
+
|
|
78
|
+
#define NW_PARAMETERS_DISABLE_PROTOCOL (_nw_parameters_configure_protocol_disable)
|
|
79
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
80
|
+
NW_PARAMETERS_CONFIGURE_PROTOCOL_TYPE_DECL(disable);
|
|
81
|
+
|
|
82
|
+
/*!
|
|
83
|
+
* @function nw_parameters_create_secure_tcp
|
|
84
|
+
*
|
|
85
|
+
* @abstract
|
|
86
|
+
* Creates a parameters object that is configured for TLS and TCP. The caller can use
|
|
87
|
+
* the default configuration for TLS and TCP, or set specific options for each protocol,
|
|
88
|
+
* or disable TLS.
|
|
89
|
+
*
|
|
90
|
+
* @param configure_tls
|
|
91
|
+
* A block to configure TLS. To use the default TLS configuration, pass
|
|
92
|
+
* NW_PARAMETERS_DEFAULT_CONFIGURATION. To configure specific options, pass a custom
|
|
93
|
+
* block and operate on the nw_protocol_options_t object. To disable TLS, pass
|
|
94
|
+
* NW_PARAMETERS_DISABLE_PROTOCOL.
|
|
95
|
+
*
|
|
96
|
+
* @param configure_tcp
|
|
97
|
+
* A block to configure TCP. To use the default TCP configuration, pass
|
|
98
|
+
* NW_PARAMETERS_DEFAULT_CONFIGURATION. To configure specific options, pass a custom
|
|
99
|
+
* block and operate on the nw_protocol_options_t object. It is invalid to try
|
|
100
|
+
* to disable TCP using NW_PARAMETERS_DISABLE_PROTOCOL.
|
|
101
|
+
*
|
|
102
|
+
* @result
|
|
103
|
+
* Returns an allocated nw_parameters_t object on success.
|
|
104
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
105
|
+
* These objects support ARC.
|
|
106
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
107
|
+
*/
|
|
108
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
109
|
+
NW_RETURNS_RETAINED nw_parameters_t
|
|
110
|
+
nw_parameters_create_secure_tcp(nw_parameters_configure_protocol_block_t configure_tls,
|
|
111
|
+
nw_parameters_configure_protocol_block_t configure_tcp);
|
|
112
|
+
|
|
113
|
+
/*!
|
|
114
|
+
* @function nw_parameters_create_secure_udp
|
|
115
|
+
*
|
|
116
|
+
* @abstract
|
|
117
|
+
* Creates a parameters object that is configured for DTLS and UDP. The caller can use
|
|
118
|
+
* the default configuration for DTLS and UDP, or set specific options for each protocol,
|
|
119
|
+
* or disable DTLS.
|
|
120
|
+
*
|
|
121
|
+
* @param configure_dtls
|
|
122
|
+
* A block to configure DTLS. To use the default DTLS configuration, pass
|
|
123
|
+
* NW_PARAMETERS_DEFAULT_CONFIGURATION. To configure specific options, pass a custom
|
|
124
|
+
* block and operate on the nw_protocol_options_t object. To disable DTLS, pass
|
|
125
|
+
* NW_PARAMETERS_DISABLE_PROTOCOL.
|
|
126
|
+
*
|
|
127
|
+
* @param configure_udp
|
|
128
|
+
* A block to configure UDP. To use the default UDP configuration, pass
|
|
129
|
+
* NW_PARAMETERS_DEFAULT_CONFIGURATION. To configure specific options, pass a custom
|
|
130
|
+
* block and operate on the nw_protocol_options_t object. It is invalid to try
|
|
131
|
+
* to disable UDP using NW_PARAMETERS_DISABLE_PROTOCOL.
|
|
132
|
+
*
|
|
133
|
+
* @result
|
|
134
|
+
* Returns an allocated nw_parameters_t object on success.
|
|
135
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
136
|
+
* These objects support ARC.
|
|
137
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
138
|
+
*/
|
|
139
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
140
|
+
NW_RETURNS_RETAINED nw_parameters_t
|
|
141
|
+
nw_parameters_create_secure_udp(nw_parameters_configure_protocol_block_t configure_dtls,
|
|
142
|
+
nw_parameters_configure_protocol_block_t configure_udp);
|
|
143
|
+
|
|
144
|
+
/*!
|
|
145
|
+
* @function nw_parameters_create_custom_ip
|
|
146
|
+
*
|
|
147
|
+
* @abstract
|
|
148
|
+
* Creates a parameters object that is configured for a custom IP protocol.
|
|
149
|
+
* This allows the caller to create connections and listeners that send
|
|
150
|
+
* and receive IP datagrams where the protocol header contained by the IP
|
|
151
|
+
* datagram is identified by the provided protocol number. Protocols already
|
|
152
|
+
* registered by the system, such as TCP and UDP, will not be allowed.
|
|
153
|
+
*
|
|
154
|
+
* Calling processes must hold the "com.apple.developer.networking.custom-protocol"
|
|
155
|
+
* entitlement.
|
|
156
|
+
*
|
|
157
|
+
* @param custom_ip_protocol_number
|
|
158
|
+
* The protocol number identifying a protocol carried by IP, as defined
|
|
159
|
+
* in RFC 5237.
|
|
160
|
+
*
|
|
161
|
+
* @param configure_ip
|
|
162
|
+
* A block to configure IP. To use the default IP configuration, pass
|
|
163
|
+
* NW_PARAMETERS_DEFAULT_CONFIGURATION. To configure specific options, pass a custom
|
|
164
|
+
* block and operate on the nw_protocol_options_t object. It is invalid to try
|
|
165
|
+
* to disable IP using NW_PARAMETERS_DISABLE_PROTOCOL.
|
|
166
|
+
*
|
|
167
|
+
* @result
|
|
168
|
+
* Returns an allocated nw_parameters_t object on success.
|
|
169
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
170
|
+
* These objects support ARC.
|
|
171
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
172
|
+
*/
|
|
173
|
+
API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
174
|
+
NW_RETURNS_RETAINED nw_parameters_t
|
|
175
|
+
nw_parameters_create_custom_ip(uint8_t custom_ip_protocol_number,
|
|
176
|
+
nw_parameters_configure_protocol_block_t configure_ip);
|
|
177
|
+
|
|
178
|
+
/*!
|
|
179
|
+
* @function nw_parameters_create_quic
|
|
180
|
+
*
|
|
181
|
+
* @abstract
|
|
182
|
+
* Creates a parameters object that is configured for QUIC. The caller must
|
|
183
|
+
* pass in a block to configure options.
|
|
184
|
+
*
|
|
185
|
+
* @param configure_quic
|
|
186
|
+
* A block to configure QUIC. The caller must pass a custom
|
|
187
|
+
* block to configure the QUIC options.
|
|
188
|
+
*
|
|
189
|
+
* @result
|
|
190
|
+
* Returns an allocated nw_parameters_t object on success.
|
|
191
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
192
|
+
* These objects support ARC.
|
|
193
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
194
|
+
*/
|
|
195
|
+
API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
|
|
196
|
+
NW_RETURNS_RETAINED nw_parameters_t
|
|
197
|
+
nw_parameters_create_quic(nw_parameters_configure_protocol_block_t configure_quic);
|
|
198
|
+
|
|
199
|
+
#endif // __BLOCKS__
|
|
200
|
+
|
|
201
|
+
/*!
|
|
202
|
+
* @function nw_parameters_create_application_service
|
|
203
|
+
*
|
|
204
|
+
* @abstract
|
|
205
|
+
* Creates default parameters for use with application services.
|
|
206
|
+
*
|
|
207
|
+
* @result
|
|
208
|
+
* Returns an allocated nw_parameters_t object on success.
|
|
209
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
210
|
+
* These objects support ARC.
|
|
211
|
+
*/
|
|
212
|
+
API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
|
|
213
|
+
NW_RETURNS_RETAINED nw_parameters_t
|
|
214
|
+
nw_parameters_create_application_service(void);
|
|
215
|
+
|
|
216
|
+
/*!
|
|
217
|
+
* @function nw_parameters_create
|
|
218
|
+
*
|
|
219
|
+
* @abstract
|
|
220
|
+
* Creates a generic parameters object. Note that in order to use parameters
|
|
221
|
+
* with an nw_connection_t or an nw_listener_t, the parameters must have protocols
|
|
222
|
+
* added into the default nw_protocol_stack_t. Clients using standard protocol
|
|
223
|
+
* configurations should use nw_parameters_create_secure_tcp() or
|
|
224
|
+
* nw_parameters_create_secure_udp().
|
|
225
|
+
*
|
|
226
|
+
* @result
|
|
227
|
+
* Returns an allocated nw_parameters_t object on success.
|
|
228
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
229
|
+
* These objects support ARC.
|
|
230
|
+
*/
|
|
231
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
232
|
+
NW_RETURNS_RETAINED nw_parameters_t
|
|
233
|
+
nw_parameters_create(void);
|
|
234
|
+
|
|
235
|
+
/*!
|
|
236
|
+
* @function nw_parameters_copy
|
|
237
|
+
*
|
|
238
|
+
* @abstract
|
|
239
|
+
* Creates a deep copy of a parameters object that can be modified.
|
|
240
|
+
*
|
|
241
|
+
* @param parameters
|
|
242
|
+
* The existing parameters object to copy
|
|
243
|
+
*
|
|
244
|
+
* @result
|
|
245
|
+
* Returns a newly allocated nw_parameters_t object on success.
|
|
246
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
247
|
+
* These objects support ARC.
|
|
248
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
249
|
+
*/
|
|
250
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
251
|
+
NW_RETURNS_RETAINED nw_parameters_t
|
|
252
|
+
nw_parameters_copy(nw_parameters_t parameters);
|
|
253
|
+
|
|
254
|
+
/*!
|
|
255
|
+
* @function nw_parameters_set_privacy_context
|
|
256
|
+
*
|
|
257
|
+
* @abstract
|
|
258
|
+
* Set a privacy context on the parameters, which will be associated
|
|
259
|
+
* with connections and listeners. The privacy context allows
|
|
260
|
+
* using separate caches for different sets of connections, as well as
|
|
261
|
+
* restricting how connection-specific information is logged and shared
|
|
262
|
+
* on the network.
|
|
263
|
+
*
|
|
264
|
+
* @param parameters
|
|
265
|
+
* The parameters object to configure
|
|
266
|
+
*
|
|
267
|
+
* @param privacy_context
|
|
268
|
+
* The privacy context to associate with connections and listeners that use
|
|
269
|
+
* these parameters.
|
|
270
|
+
*/
|
|
271
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
272
|
+
void
|
|
273
|
+
nw_parameters_set_privacy_context(nw_parameters_t parameters,
|
|
274
|
+
nw_privacy_context_t privacy_context);
|
|
275
|
+
|
|
276
|
+
/*!
|
|
277
|
+
* @typedef nw_parameters_attribution_t
|
|
278
|
+
* @abstract
|
|
279
|
+
* Attribution values can be used to indicate who determined the network content being accessed.
|
|
280
|
+
*/
|
|
281
|
+
typedef NW_ENUM(uint8_t, nw_parameters_attribution_t) {
|
|
282
|
+
/*! @const nw_parameters_attribution_developer Developer chosen content. */
|
|
283
|
+
nw_parameters_attribution_developer = 1,
|
|
284
|
+
/*! @const nw_parameters_attribution_user User chosen content. */
|
|
285
|
+
nw_parameters_attribution_user = 2
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
/*!
|
|
289
|
+
* @function nw_parameters_set_attribution
|
|
290
|
+
*
|
|
291
|
+
* @abstract
|
|
292
|
+
* In order to help differentiate communication with domains requested by the user from those requested by the
|
|
293
|
+
* developer, attribution may be used. Attribution defaults to nw_parameters_attribution_developer. Setting
|
|
294
|
+
* attribution to nw_parameters_attribution_user indicates that the networking performed using these parameters
|
|
295
|
+
* is directed to content specified by the user, not the developer.
|
|
296
|
+
*
|
|
297
|
+
* @param parameters
|
|
298
|
+
* The parameters to modify.
|
|
299
|
+
*
|
|
300
|
+
* @param attribution
|
|
301
|
+
* The entity to attribute the network operations to.
|
|
302
|
+
*/
|
|
303
|
+
API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
|
|
304
|
+
void
|
|
305
|
+
nw_parameters_set_attribution(nw_parameters_t parameters, nw_parameters_attribution_t attribution);
|
|
306
|
+
|
|
307
|
+
/*!
|
|
308
|
+
* @function nw_parameters_get_attribution
|
|
309
|
+
*
|
|
310
|
+
* @abstract
|
|
311
|
+
* Returns the attribution set on the parameters.
|
|
312
|
+
*
|
|
313
|
+
* @param parameters
|
|
314
|
+
* The parameters to check.
|
|
315
|
+
*
|
|
316
|
+
* @result
|
|
317
|
+
* Returns the attribution property of the parameters.
|
|
318
|
+
*/
|
|
319
|
+
API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
|
|
320
|
+
nw_parameters_attribution_t
|
|
321
|
+
nw_parameters_get_attribution(nw_parameters_t parameters);
|
|
322
|
+
|
|
323
|
+
#pragma mark - Path Selection
|
|
324
|
+
|
|
325
|
+
/*!
|
|
326
|
+
* @function nw_parameters_require_interface
|
|
327
|
+
*
|
|
328
|
+
* @abstract
|
|
329
|
+
* Require any connections or listeners using these parameters to use
|
|
330
|
+
* the provided network interface, or none if NULL is passed.
|
|
331
|
+
*
|
|
332
|
+
* @param parameters
|
|
333
|
+
* The parameters object to configure
|
|
334
|
+
*
|
|
335
|
+
* @param interface
|
|
336
|
+
* The interface to require for connections or listeners, or NULL to
|
|
337
|
+
* allow any interface.
|
|
338
|
+
*/
|
|
339
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
340
|
+
void
|
|
341
|
+
nw_parameters_require_interface(nw_parameters_t parameters,
|
|
342
|
+
_Nullable nw_interface_t interface);
|
|
343
|
+
|
|
344
|
+
/*!
|
|
345
|
+
* @function nw_parameters_copy_required_interface
|
|
346
|
+
*
|
|
347
|
+
* @abstract
|
|
348
|
+
* Access the required network interface set on the parameters.
|
|
349
|
+
*
|
|
350
|
+
* @param parameters
|
|
351
|
+
* The parameters object to check
|
|
352
|
+
*
|
|
353
|
+
* @result
|
|
354
|
+
* Returns the interface that is required by the parameters, or
|
|
355
|
+
* NULL if no interface is required.
|
|
356
|
+
*/
|
|
357
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
358
|
+
NW_RETURNS_RETAINED _Nullable nw_interface_t
|
|
359
|
+
nw_parameters_copy_required_interface(nw_parameters_t parameters);
|
|
360
|
+
|
|
361
|
+
/*!
|
|
362
|
+
* @function nw_parameters_prohibit_interface
|
|
363
|
+
*
|
|
364
|
+
* @abstract
|
|
365
|
+
* Prohibit any connections or listeners using these parameters from using
|
|
366
|
+
* the provided network interface.
|
|
367
|
+
*
|
|
368
|
+
* @param parameters
|
|
369
|
+
* The parameters object to configure
|
|
370
|
+
*
|
|
371
|
+
* @param interface
|
|
372
|
+
* The interface to prohibit for connections or listeners.
|
|
373
|
+
*/
|
|
374
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
375
|
+
void
|
|
376
|
+
nw_parameters_prohibit_interface(nw_parameters_t parameters,
|
|
377
|
+
nw_interface_t interface);
|
|
378
|
+
|
|
379
|
+
/*!
|
|
380
|
+
* @function nw_parameters_clear_prohibited_interfaces
|
|
381
|
+
*
|
|
382
|
+
* @abstract
|
|
383
|
+
* Clear any interfaces that had been prohibited.
|
|
384
|
+
*
|
|
385
|
+
* @param parameters
|
|
386
|
+
* The parameters object to modify
|
|
387
|
+
*/
|
|
388
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
389
|
+
void
|
|
390
|
+
nw_parameters_clear_prohibited_interfaces(nw_parameters_t parameters);
|
|
391
|
+
|
|
392
|
+
#ifdef __BLOCKS__
|
|
393
|
+
|
|
394
|
+
typedef bool (^nw_parameters_iterate_interfaces_block_t)(nw_interface_t interface);
|
|
395
|
+
|
|
396
|
+
/*!
|
|
397
|
+
* @function nw_parameters_iterate_prohibited_interfaces
|
|
398
|
+
*
|
|
399
|
+
* @abstract
|
|
400
|
+
* List all prohibited network interfaces.
|
|
401
|
+
*
|
|
402
|
+
* @param parameters
|
|
403
|
+
* The parameters object to check
|
|
404
|
+
*
|
|
405
|
+
* @param iterate_block
|
|
406
|
+
* A block that will return the interfaces prohibited by the parameters. Returning
|
|
407
|
+
* true from the block will continue to iterate, and returning false will stop
|
|
408
|
+
* iterating.
|
|
409
|
+
*/
|
|
410
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
411
|
+
void
|
|
412
|
+
nw_parameters_iterate_prohibited_interfaces(nw_parameters_t parameters,
|
|
413
|
+
NW_NOESCAPE nw_parameters_iterate_interfaces_block_t iterate_block);
|
|
414
|
+
|
|
415
|
+
#endif // __BLOCKS__
|
|
416
|
+
|
|
417
|
+
/*!
|
|
418
|
+
* @function nw_parameters_set_required_interface_type
|
|
419
|
+
*
|
|
420
|
+
* @abstract
|
|
421
|
+
* Require any connections or listeners using these parameters to use
|
|
422
|
+
* the provided network interface type.
|
|
423
|
+
*
|
|
424
|
+
* @param parameters
|
|
425
|
+
* The parameters object to configure
|
|
426
|
+
*
|
|
427
|
+
* @param interface_type
|
|
428
|
+
* The interface type to require for connections or listeners.
|
|
429
|
+
*/
|
|
430
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
431
|
+
void
|
|
432
|
+
nw_parameters_set_required_interface_type(nw_parameters_t parameters,
|
|
433
|
+
nw_interface_type_t interface_type);
|
|
434
|
+
|
|
435
|
+
/*!
|
|
436
|
+
* @function nw_parameters_get_required_interface_type
|
|
437
|
+
*
|
|
438
|
+
* @abstract
|
|
439
|
+
* Access the required network interface type set on the parameters.
|
|
440
|
+
*
|
|
441
|
+
* @param parameters
|
|
442
|
+
* The parameters object to check
|
|
443
|
+
*
|
|
444
|
+
* @result
|
|
445
|
+
* Returns the interface type that is required by the parameters, or
|
|
446
|
+
* nw_interface_type_other_t if no interface type is required.
|
|
447
|
+
*/
|
|
448
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
449
|
+
nw_interface_type_t
|
|
450
|
+
nw_parameters_get_required_interface_type(nw_parameters_t parameters);
|
|
451
|
+
|
|
452
|
+
/*!
|
|
453
|
+
* @function nw_parameters_prohibit_interface_type
|
|
454
|
+
*
|
|
455
|
+
* @abstract
|
|
456
|
+
* Prohibit any connections or listeners using these parameters from using
|
|
457
|
+
* the provided network interface type.
|
|
458
|
+
*
|
|
459
|
+
* @param parameters
|
|
460
|
+
* The parameters object to configure
|
|
461
|
+
*
|
|
462
|
+
* @param interface_type
|
|
463
|
+
* The interface type to prohibit for connections or listeners.
|
|
464
|
+
*/
|
|
465
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
466
|
+
void
|
|
467
|
+
nw_parameters_prohibit_interface_type(nw_parameters_t parameters,
|
|
468
|
+
nw_interface_type_t interface_type);
|
|
469
|
+
|
|
470
|
+
/*!
|
|
471
|
+
* @function nw_parameters_clear_prohibited_interface_types
|
|
472
|
+
*
|
|
473
|
+
* @abstract
|
|
474
|
+
* Clear any interface types that had been prohibited.
|
|
475
|
+
*
|
|
476
|
+
* @param parameters
|
|
477
|
+
* The parameters object to modify
|
|
478
|
+
*/
|
|
479
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
480
|
+
void
|
|
481
|
+
nw_parameters_clear_prohibited_interface_types(nw_parameters_t parameters);
|
|
482
|
+
|
|
483
|
+
#ifdef __BLOCKS__
|
|
484
|
+
|
|
485
|
+
typedef bool (^nw_parameters_iterate_interface_types_block_t)(nw_interface_type_t interface_type);
|
|
486
|
+
|
|
487
|
+
/*!
|
|
488
|
+
* @function nw_parameters_iterate_prohibited_interface_types
|
|
489
|
+
*
|
|
490
|
+
* @abstract
|
|
491
|
+
* List all prohibited network interface types.
|
|
492
|
+
*
|
|
493
|
+
* @param parameters
|
|
494
|
+
* The parameters object to check
|
|
495
|
+
*
|
|
496
|
+
* @param iterate_block
|
|
497
|
+
* A block that will return the interface types prohibited by the parameters. Returning
|
|
498
|
+
* true from the block will continue to iterate, and returning false will stop
|
|
499
|
+
* iterating.
|
|
500
|
+
*/
|
|
501
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
502
|
+
void
|
|
503
|
+
nw_parameters_iterate_prohibited_interface_types(nw_parameters_t parameters,
|
|
504
|
+
NW_NOESCAPE nw_parameters_iterate_interface_types_block_t iterate_block);
|
|
505
|
+
|
|
506
|
+
#endif // __BLOCKS__
|
|
507
|
+
|
|
508
|
+
/*!
|
|
509
|
+
* @function nw_parameters_set_prohibit_expensive
|
|
510
|
+
*
|
|
511
|
+
* @abstract
|
|
512
|
+
* Prohibit any connections or listeners using these parameters from using
|
|
513
|
+
* a network interface that is considered expensive by the system.
|
|
514
|
+
*
|
|
515
|
+
* @param parameters
|
|
516
|
+
* The parameters object to configure
|
|
517
|
+
*
|
|
518
|
+
* @param prohibit_expensive
|
|
519
|
+
* If true, prohibit the use of any expensive interfaces. If false,
|
|
520
|
+
* allow expensive interfaces. Defaults to false.
|
|
521
|
+
*/
|
|
522
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
523
|
+
void
|
|
524
|
+
nw_parameters_set_prohibit_expensive(nw_parameters_t parameters,
|
|
525
|
+
bool prohibit_expensive);
|
|
526
|
+
|
|
527
|
+
/*!
|
|
528
|
+
* @function nw_parameters_get_prohibit_expensive
|
|
529
|
+
*
|
|
530
|
+
* @abstract
|
|
531
|
+
* Check if the parameters prohibit expensive interfaces.
|
|
532
|
+
*
|
|
533
|
+
* @param parameters
|
|
534
|
+
* The parameters object to check
|
|
535
|
+
*
|
|
536
|
+
* @result
|
|
537
|
+
* Returns true if expensive interfaces are prohibited, or
|
|
538
|
+
* false otherwise.
|
|
539
|
+
*/
|
|
540
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
541
|
+
bool
|
|
542
|
+
nw_parameters_get_prohibit_expensive(nw_parameters_t parameters);
|
|
543
|
+
|
|
544
|
+
/*!
|
|
545
|
+
* @function nw_parameters_set_prohibit_constrained
|
|
546
|
+
*
|
|
547
|
+
* @abstract
|
|
548
|
+
* Prohibit any connections or listeners using these parameters from using
|
|
549
|
+
* a network interface that is considered constrained by the system.
|
|
550
|
+
*
|
|
551
|
+
* @param parameters
|
|
552
|
+
* The parameters object to configure
|
|
553
|
+
*
|
|
554
|
+
* @param prohibit_constrained
|
|
555
|
+
* If true, prohibit the use of any constrained interfaces. If false,
|
|
556
|
+
* allow constrained interfaces. Defaults to false.
|
|
557
|
+
*/
|
|
558
|
+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
|
|
559
|
+
void
|
|
560
|
+
nw_parameters_set_prohibit_constrained(nw_parameters_t parameters,
|
|
561
|
+
bool prohibit_constrained);
|
|
562
|
+
|
|
563
|
+
/*!
|
|
564
|
+
* @function nw_parameters_get_prohibit_constrained
|
|
565
|
+
*
|
|
566
|
+
* @abstract
|
|
567
|
+
* Check if the parameters prohibit constrained interfaces.
|
|
568
|
+
*
|
|
569
|
+
* @param parameters
|
|
570
|
+
* The parameters object to check
|
|
571
|
+
*
|
|
572
|
+
* @result
|
|
573
|
+
* Returns true if constrained interfaces are prohibited, or
|
|
574
|
+
* false otherwise.
|
|
575
|
+
*/
|
|
576
|
+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
|
|
577
|
+
bool
|
|
578
|
+
nw_parameters_get_prohibit_constrained(nw_parameters_t parameters);
|
|
579
|
+
|
|
580
|
+
/*!
|
|
581
|
+
* @function nw_parameters_set_allow_ultra_constrained
|
|
582
|
+
*
|
|
583
|
+
* @abstract
|
|
584
|
+
* Explicitly allow connectivity over ultra-constrained interfaces. Without
|
|
585
|
+
* this being set, connections are not allowed to use these interfaces.
|
|
586
|
+
*
|
|
587
|
+
* @param parameters
|
|
588
|
+
* The parameters to modify.
|
|
589
|
+
*
|
|
590
|
+
* @param allow_ultra_constrained
|
|
591
|
+
* Whether or not ultra-constrained interfaces are allowed.
|
|
592
|
+
*/
|
|
593
|
+
API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0))
|
|
594
|
+
void nw_parameters_set_allow_ultra_constrained(nw_parameters_t parameters, bool allow_ultra_constrained);
|
|
595
|
+
|
|
596
|
+
/*!
|
|
597
|
+
* @function nw_parameters_get_allow_ultra_constrained
|
|
598
|
+
*
|
|
599
|
+
* @abstract
|
|
600
|
+
* Check if the parameters explicitly allow connectivity over
|
|
601
|
+
* ultra-constrained interfaces.
|
|
602
|
+
*
|
|
603
|
+
* @param parameters
|
|
604
|
+
* The parameters to check.
|
|
605
|
+
*
|
|
606
|
+
* @result
|
|
607
|
+
* Returns whether or not ultra-constrained interfaces are allowed.
|
|
608
|
+
*/
|
|
609
|
+
API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0))
|
|
610
|
+
bool nw_parameters_get_allow_ultra_constrained(nw_parameters_t parameters);
|
|
611
|
+
|
|
612
|
+
/*!
|
|
613
|
+
* @function nw_parameters_set_reuse_local_address
|
|
614
|
+
*
|
|
615
|
+
* @abstract
|
|
616
|
+
* Allow any connections using these parameters to reuse
|
|
617
|
+
* local addresses already in use by other connections.
|
|
618
|
+
*
|
|
619
|
+
* @param parameters
|
|
620
|
+
* The parameters object to configure
|
|
621
|
+
*
|
|
622
|
+
* @param reuse_local_address
|
|
623
|
+
* If true, allow the reuse of local addresses. If false,
|
|
624
|
+
* disallow the reuse of local addresses. Defaults to false.
|
|
625
|
+
*/
|
|
626
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
627
|
+
void
|
|
628
|
+
nw_parameters_set_reuse_local_address(nw_parameters_t parameters,
|
|
629
|
+
bool reuse_local_address);
|
|
630
|
+
|
|
631
|
+
/*!
|
|
632
|
+
* @function nw_parameters_get_reuse_local_address
|
|
633
|
+
*
|
|
634
|
+
* @abstract
|
|
635
|
+
* Check if the parameters allow local address reuse.
|
|
636
|
+
*
|
|
637
|
+
* @param parameters
|
|
638
|
+
* The parameters object to check
|
|
639
|
+
*
|
|
640
|
+
* @result
|
|
641
|
+
* Returns true if local address reuse is allowed, or
|
|
642
|
+
* false otherwise.
|
|
643
|
+
*/
|
|
644
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
645
|
+
bool
|
|
646
|
+
nw_parameters_get_reuse_local_address(nw_parameters_t parameters);
|
|
647
|
+
|
|
648
|
+
/*!
|
|
649
|
+
* @function nw_parameters_set_local_endpoint
|
|
650
|
+
*
|
|
651
|
+
* @abstract
|
|
652
|
+
* Specify a specific endpoint to use as the local endpoint.
|
|
653
|
+
* For connections, this will be used to initiate traffic;
|
|
654
|
+
* for listeners, this will be used for receiving incoming
|
|
655
|
+
* connections.
|
|
656
|
+
*
|
|
657
|
+
* @param parameters
|
|
658
|
+
* The parameters object to configure
|
|
659
|
+
*
|
|
660
|
+
* @param local_endpoint
|
|
661
|
+
* The endpoint to set as the local endpoint. Pass NULL to
|
|
662
|
+
* clear the local endpoint.
|
|
663
|
+
*/
|
|
664
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
665
|
+
void
|
|
666
|
+
nw_parameters_set_local_endpoint(nw_parameters_t parameters,
|
|
667
|
+
_Nullable nw_endpoint_t local_endpoint);
|
|
668
|
+
|
|
669
|
+
/*!
|
|
670
|
+
* @function nw_parameters_copy_local_endpoint
|
|
671
|
+
*
|
|
672
|
+
* @abstract
|
|
673
|
+
* Extract the local endpoint set on the connection.
|
|
674
|
+
*
|
|
675
|
+
* @param parameters
|
|
676
|
+
* The parameters object to configure
|
|
677
|
+
*
|
|
678
|
+
* @result
|
|
679
|
+
* Returns the endpoint that is set in the parameters, or
|
|
680
|
+
* NULL if no local endpoint is set.
|
|
681
|
+
*/
|
|
682
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
683
|
+
NW_RETURNS_RETAINED _Nullable nw_endpoint_t
|
|
684
|
+
nw_parameters_copy_local_endpoint(nw_parameters_t parameters);
|
|
685
|
+
|
|
686
|
+
/*!
|
|
687
|
+
* @function nw_parameters_set_include_peer_to_peer
|
|
688
|
+
*
|
|
689
|
+
* @abstract
|
|
690
|
+
* Allow the inclusion of peer-to-peer interfaces when
|
|
691
|
+
* listening or establishing outbound connections. This parameter
|
|
692
|
+
* will not take effect if a specific interface is required.
|
|
693
|
+
* This parameter is applicable when advertising a Bonjour service
|
|
694
|
+
* on a listener, or connecting to a Bonjour service.
|
|
695
|
+
*
|
|
696
|
+
* @param parameters
|
|
697
|
+
* The parameters object to configure
|
|
698
|
+
*
|
|
699
|
+
* @param include_peer_to_peer
|
|
700
|
+
* If true, allow advertising, resolving, and connecting over
|
|
701
|
+
* peer-to-peer interfaces. Defaults to false.
|
|
702
|
+
*/
|
|
703
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
704
|
+
void
|
|
705
|
+
nw_parameters_set_include_peer_to_peer(nw_parameters_t parameters,
|
|
706
|
+
bool include_peer_to_peer);
|
|
707
|
+
|
|
708
|
+
/*!
|
|
709
|
+
* @function nw_parameters_get_include_peer_to_peer
|
|
710
|
+
*
|
|
711
|
+
* @abstract
|
|
712
|
+
* Check if the parameters allow the inclusion of
|
|
713
|
+
* peer-to-peer interfaces.
|
|
714
|
+
*
|
|
715
|
+
* @param parameters
|
|
716
|
+
* The parameters object to check
|
|
717
|
+
*
|
|
718
|
+
* @result
|
|
719
|
+
* Returns true if peer-to-peer interfaces are allowed,
|
|
720
|
+
* or false otherwise.
|
|
721
|
+
*/
|
|
722
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
723
|
+
bool
|
|
724
|
+
nw_parameters_get_include_peer_to_peer(nw_parameters_t parameters);
|
|
725
|
+
|
|
726
|
+
#pragma mark - Data Handling
|
|
727
|
+
|
|
728
|
+
/*!
|
|
729
|
+
* @function nw_parameters_set_fast_open_enabled
|
|
730
|
+
*
|
|
731
|
+
* @abstract
|
|
732
|
+
* Use fast open for an outbound connection, which may be done at any
|
|
733
|
+
* protocol level. Use of fast open requires that the caller send
|
|
734
|
+
* idempotent data on the connection before the connection may move
|
|
735
|
+
* into the ready state. As a side effect, this may implicitly enable
|
|
736
|
+
* fast open or early data for protocols in the stack, even if they did not
|
|
737
|
+
* have fast open explicitly enabled on them (such as the option to enable
|
|
738
|
+
* TCP Fast Open).
|
|
739
|
+
*
|
|
740
|
+
* NOTE: Use of this API may have security implications for application data.
|
|
741
|
+
* In particular, TLS early data is replayable by a network attacker. Callers must
|
|
742
|
+
* account for this when sending data before the handshake is confirmed. See
|
|
743
|
+
* RFC 8446 for more information. Callers MUST NOT enable fast open without
|
|
744
|
+
* a specific application profile that defines its use.
|
|
745
|
+
*
|
|
746
|
+
* @param parameters
|
|
747
|
+
* The parameters object to configure
|
|
748
|
+
*
|
|
749
|
+
* @param fast_open_enabled
|
|
750
|
+
* If true, indicate that fast open is requested and that idempotent data
|
|
751
|
+
* MUST be sent by the caller on the connection. If false,
|
|
752
|
+
* disallow the fast open at the top level protocol. Defaults to false.
|
|
753
|
+
*/
|
|
754
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
755
|
+
void
|
|
756
|
+
nw_parameters_set_fast_open_enabled(nw_parameters_t parameters,
|
|
757
|
+
bool fast_open_enabled);
|
|
758
|
+
|
|
759
|
+
/*!
|
|
760
|
+
* @function nw_parameters_get_fast_open_enabled
|
|
761
|
+
*
|
|
762
|
+
* @abstract
|
|
763
|
+
* Check if the parameters allow the use of fast open for the top level
|
|
764
|
+
* protocol.
|
|
765
|
+
*
|
|
766
|
+
* @param parameters
|
|
767
|
+
* The parameters object to check
|
|
768
|
+
*
|
|
769
|
+
* @result
|
|
770
|
+
* Returns true if fast open is allowed for the top level protocol, or
|
|
771
|
+
* false otherwise.
|
|
772
|
+
*/
|
|
773
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
774
|
+
bool
|
|
775
|
+
nw_parameters_get_fast_open_enabled(nw_parameters_t parameters);
|
|
776
|
+
|
|
777
|
+
/*!
|
|
778
|
+
* @typedef nw_service_class_t
|
|
779
|
+
* @abstract
|
|
780
|
+
* The network service class represents the network queuing priority to use
|
|
781
|
+
* for traffic generated by a connection.
|
|
782
|
+
*/
|
|
783
|
+
typedef enum {
|
|
784
|
+
/*! @const nw_service_class_best_effort Default priority traffic */
|
|
785
|
+
nw_service_class_best_effort = 0,
|
|
786
|
+
/*! @const nw_service_class_background Bulk traffic, or traffic that can be de-prioritized behind foreground traffic */
|
|
787
|
+
nw_service_class_background = 1,
|
|
788
|
+
/*! @const nw_service_class_interactive_video Interactive video traffic */
|
|
789
|
+
nw_service_class_interactive_video = 2,
|
|
790
|
+
/*! @const nw_service_class_interactive_voice Interactive voice traffic */
|
|
791
|
+
nw_service_class_interactive_voice = 3,
|
|
792
|
+
/*! @const nw_service_class_responsive_data Interactive user data */
|
|
793
|
+
nw_service_class_responsive_data = 4,
|
|
794
|
+
/*! @const nw_service_class_signaling Bursty but short. Intolerant of delay and loss. For example, SIP. */
|
|
795
|
+
nw_service_class_signaling = 5,
|
|
796
|
+
} nw_service_class_t;
|
|
797
|
+
|
|
798
|
+
/*!
|
|
799
|
+
* @function nw_parameters_set_service_class
|
|
800
|
+
*
|
|
801
|
+
* @abstract
|
|
802
|
+
* Set the data service class to use for connections.
|
|
803
|
+
*
|
|
804
|
+
* @param parameters
|
|
805
|
+
* The parameters object to configure
|
|
806
|
+
*
|
|
807
|
+
* @param service_class
|
|
808
|
+
* The service class value to use for connections. Defaults to nw_service_class_best_effort.
|
|
809
|
+
*/
|
|
810
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
811
|
+
void
|
|
812
|
+
nw_parameters_set_service_class(nw_parameters_t parameters,
|
|
813
|
+
nw_service_class_t service_class);
|
|
814
|
+
|
|
815
|
+
/*!
|
|
816
|
+
* @function nw_parameters_get_service_class
|
|
817
|
+
*
|
|
818
|
+
* @abstract
|
|
819
|
+
* Check the service class configured on the parameters.
|
|
820
|
+
*
|
|
821
|
+
* @param parameters
|
|
822
|
+
* The parameters object to check
|
|
823
|
+
*
|
|
824
|
+
* @result
|
|
825
|
+
* Returns the effective service class configured on the parameters.
|
|
826
|
+
*/
|
|
827
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
828
|
+
nw_service_class_t
|
|
829
|
+
nw_parameters_get_service_class(nw_parameters_t parameters);
|
|
830
|
+
|
|
831
|
+
/*!
|
|
832
|
+
* @typedef nw_multipath_service_t
|
|
833
|
+
* @abstract
|
|
834
|
+
* Multipath services represent the modes of multipath usage that are
|
|
835
|
+
* allowed for connections.
|
|
836
|
+
*/
|
|
837
|
+
typedef enum {
|
|
838
|
+
/*! @const nw_multipath_service_disabled No multipath transport will be attempted */
|
|
839
|
+
nw_multipath_service_disabled = 0,
|
|
840
|
+
/*! @const nw_multipath_service_handover Only use the expensive interface when the when the primary one is not available */
|
|
841
|
+
nw_multipath_service_handover = 1,
|
|
842
|
+
/*! @const nw_multipath_service_interactive Use the expensive interface more aggressively to reduce latency */
|
|
843
|
+
nw_multipath_service_interactive = 2,
|
|
844
|
+
/*! @const nw_multipath_service_aggregate Use all available interfaces to provide the highest throughput and lowest latency */
|
|
845
|
+
nw_multipath_service_aggregate = 3,
|
|
846
|
+
} nw_multipath_service_t;
|
|
847
|
+
|
|
848
|
+
/*!
|
|
849
|
+
* @function nw_parameters_set_multipath_service
|
|
850
|
+
*
|
|
851
|
+
* @abstract
|
|
852
|
+
* Set the multipath service to use for connections.
|
|
853
|
+
*
|
|
854
|
+
* @param parameters
|
|
855
|
+
* The parameters object to configure
|
|
856
|
+
*
|
|
857
|
+
* @param multipath_service
|
|
858
|
+
* The multipath service value to use for connections. Defaults to nw_multipath_service_disabled.
|
|
859
|
+
*/
|
|
860
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
861
|
+
void
|
|
862
|
+
nw_parameters_set_multipath_service(nw_parameters_t parameters,
|
|
863
|
+
nw_multipath_service_t multipath_service);
|
|
864
|
+
|
|
865
|
+
/*!
|
|
866
|
+
* @function nw_parameters_get_multipath_service
|
|
867
|
+
*
|
|
868
|
+
* @abstract
|
|
869
|
+
* Check the multipath service mode configured on the parameters.
|
|
870
|
+
*
|
|
871
|
+
* @param parameters
|
|
872
|
+
* The parameters object to check
|
|
873
|
+
*
|
|
874
|
+
* @result
|
|
875
|
+
* Returns the multipath service configured on the parameters.
|
|
876
|
+
*/
|
|
877
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
878
|
+
nw_multipath_service_t
|
|
879
|
+
nw_parameters_get_multipath_service(nw_parameters_t parameters);
|
|
880
|
+
|
|
881
|
+
#pragma mark - Protocol Options
|
|
882
|
+
|
|
883
|
+
/*!
|
|
884
|
+
* @function nw_parameters_copy_default_protocol_stack
|
|
885
|
+
*
|
|
886
|
+
* @abstract
|
|
887
|
+
* Retrieve the default protocol stack from a parameters object.
|
|
888
|
+
* Every parameters object will have a default protocol stack. For
|
|
889
|
+
* parameters created with a convenience initializer, this protocol
|
|
890
|
+
* stack will be pre-populated. For parameters created with the generic
|
|
891
|
+
* initializers, the stack will be empty.
|
|
892
|
+
*
|
|
893
|
+
* @param parameters
|
|
894
|
+
* The parameters object to check
|
|
895
|
+
*
|
|
896
|
+
* @result
|
|
897
|
+
* Returns an nw_protocol_stack_t object that can be inspected and modified.
|
|
898
|
+
*/
|
|
899
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
900
|
+
NW_RETURNS_RETAINED nw_protocol_stack_t
|
|
901
|
+
nw_parameters_copy_default_protocol_stack(nw_parameters_t parameters);
|
|
902
|
+
|
|
903
|
+
/*!
|
|
904
|
+
* @function nw_protocol_stack_prepend_application_protocol
|
|
905
|
+
*
|
|
906
|
+
* @abstract
|
|
907
|
+
* Prepend an application-layer protocol onto the top of a protocol stack.
|
|
908
|
+
*
|
|
909
|
+
* @param stack
|
|
910
|
+
* The protocol stack to modify
|
|
911
|
+
*
|
|
912
|
+
* @param protocol
|
|
913
|
+
* The protocol options to add to the stack, which contain the definition of the
|
|
914
|
+
* protocol to add.
|
|
915
|
+
*/
|
|
916
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
917
|
+
void
|
|
918
|
+
nw_protocol_stack_prepend_application_protocol(nw_protocol_stack_t stack,
|
|
919
|
+
nw_protocol_options_t protocol);
|
|
920
|
+
|
|
921
|
+
/*!
|
|
922
|
+
* @function nw_protocol_stack_clear_application_protocols
|
|
923
|
+
*
|
|
924
|
+
* @abstract
|
|
925
|
+
* Remove all application-layer protocols from a protocol stack.
|
|
926
|
+
*
|
|
927
|
+
* @param stack
|
|
928
|
+
* The protocol stack to modify
|
|
929
|
+
*/
|
|
930
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
931
|
+
void
|
|
932
|
+
nw_protocol_stack_clear_application_protocols(nw_protocol_stack_t stack);
|
|
933
|
+
|
|
934
|
+
#ifdef __BLOCKS__
|
|
935
|
+
|
|
936
|
+
typedef void (^nw_protocol_stack_iterate_protocols_block_t)(nw_protocol_options_t protocol);
|
|
937
|
+
|
|
938
|
+
/*!
|
|
939
|
+
* @function nw_protocol_stack_iterate_application_protocols
|
|
940
|
+
*
|
|
941
|
+
* @abstract
|
|
942
|
+
* List all application protocols attached to a protocol stack.
|
|
943
|
+
*
|
|
944
|
+
* @param stack
|
|
945
|
+
* The protocol stack to check
|
|
946
|
+
*
|
|
947
|
+
* @param iterate_block
|
|
948
|
+
* A block that will return the protocols attached to the stack.
|
|
949
|
+
*/
|
|
950
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
951
|
+
void
|
|
952
|
+
nw_protocol_stack_iterate_application_protocols(nw_protocol_stack_t stack,
|
|
953
|
+
NW_NOESCAPE nw_protocol_stack_iterate_protocols_block_t iterate_block);
|
|
954
|
+
|
|
955
|
+
#endif // __BLOCKS__
|
|
956
|
+
|
|
957
|
+
/*!
|
|
958
|
+
* @function nw_protocol_stack_copy_transport_protocol
|
|
959
|
+
*
|
|
960
|
+
* @abstract
|
|
961
|
+
* Access the transport-layer protocol used in a protocol stack.
|
|
962
|
+
*
|
|
963
|
+
* @param stack
|
|
964
|
+
* The protocol stack to check
|
|
965
|
+
*
|
|
966
|
+
* @result
|
|
967
|
+
* Returns the transport protocol currently set in the protocol stack,
|
|
968
|
+
* or NULL if no transport protocol is set.
|
|
969
|
+
*/
|
|
970
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
971
|
+
NW_RETURNS_RETAINED _Nullable nw_protocol_options_t
|
|
972
|
+
nw_protocol_stack_copy_transport_protocol(nw_protocol_stack_t stack);
|
|
973
|
+
|
|
974
|
+
/*!
|
|
975
|
+
* @function nw_protocol_stack_set_transport_protocol
|
|
976
|
+
*
|
|
977
|
+
* @abstract
|
|
978
|
+
* Set the transport-layer protocol to use for a protocol stack.
|
|
979
|
+
*
|
|
980
|
+
* @param stack
|
|
981
|
+
* The protocol stack to modify
|
|
982
|
+
*
|
|
983
|
+
* @param protocol
|
|
984
|
+
* The protocol options to set into the stack, which contain the definition of the
|
|
985
|
+
* protocol.
|
|
986
|
+
*/
|
|
987
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
988
|
+
void
|
|
989
|
+
nw_protocol_stack_set_transport_protocol(nw_protocol_stack_t stack,
|
|
990
|
+
nw_protocol_options_t protocol);
|
|
991
|
+
|
|
992
|
+
/*!
|
|
993
|
+
* @function nw_protocol_stack_copy_internet_protocol
|
|
994
|
+
*
|
|
995
|
+
* @abstract
|
|
996
|
+
* Access the internet-layer protocol used in a protocol stack.
|
|
997
|
+
*
|
|
998
|
+
* @param stack
|
|
999
|
+
* The protocol stack to check
|
|
1000
|
+
*
|
|
1001
|
+
* @result
|
|
1002
|
+
* Returns the internet protocol currently set in the protocol stack,
|
|
1003
|
+
* or NULL if no internet protocol is set. Note that this will generally
|
|
1004
|
+
* be NULL, unless a specific IP family is being selected.
|
|
1005
|
+
*/
|
|
1006
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
1007
|
+
NW_RETURNS_RETAINED _Nullable nw_protocol_options_t
|
|
1008
|
+
nw_protocol_stack_copy_internet_protocol(nw_protocol_stack_t stack);
|
|
1009
|
+
|
|
1010
|
+
#pragma mark - Listener Options
|
|
1011
|
+
|
|
1012
|
+
/*!
|
|
1013
|
+
* @function nw_parameters_set_local_only
|
|
1014
|
+
*
|
|
1015
|
+
* @abstract
|
|
1016
|
+
* Set to true to limit inbound connections to peers attached to the
|
|
1017
|
+
* local link only. Defaults to false.
|
|
1018
|
+
*
|
|
1019
|
+
* @param parameters
|
|
1020
|
+
* The parameters object to configure
|
|
1021
|
+
*
|
|
1022
|
+
* @param local_only
|
|
1023
|
+
* True to limit connections to the local link only.
|
|
1024
|
+
*/
|
|
1025
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
1026
|
+
void
|
|
1027
|
+
nw_parameters_set_local_only(nw_parameters_t parameters,
|
|
1028
|
+
bool local_only);
|
|
1029
|
+
|
|
1030
|
+
/*!
|
|
1031
|
+
* @function nw_parameters_get_local_only
|
|
1032
|
+
*
|
|
1033
|
+
* @abstract
|
|
1034
|
+
* Indicates whether or not the parameters limit connections to the local
|
|
1035
|
+
* link only.
|
|
1036
|
+
*
|
|
1037
|
+
* @param parameters
|
|
1038
|
+
* The parameters object to check
|
|
1039
|
+
*
|
|
1040
|
+
* @result
|
|
1041
|
+
* Returns true if the parameters limit inbound connections to the local link.
|
|
1042
|
+
*/
|
|
1043
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
1044
|
+
bool
|
|
1045
|
+
nw_parameters_get_local_only(nw_parameters_t parameters);
|
|
1046
|
+
|
|
1047
|
+
#pragma mark - Proxy Options
|
|
1048
|
+
|
|
1049
|
+
/*!
|
|
1050
|
+
* @function nw_parameters_set_prefer_no_proxy
|
|
1051
|
+
*
|
|
1052
|
+
* @abstract
|
|
1053
|
+
* Set to true to attempt connections without using proxies, only using any configured proxies if the connections
|
|
1054
|
+
* cannot otherwise be completed. Defaults to false.
|
|
1055
|
+
*
|
|
1056
|
+
* @param parameters
|
|
1057
|
+
* The parameters to modify.
|
|
1058
|
+
*
|
|
1059
|
+
* @param prefer_no_proxy
|
|
1060
|
+
* True to cause connections to be attempted without proxies.
|
|
1061
|
+
*/
|
|
1062
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
1063
|
+
void
|
|
1064
|
+
nw_parameters_set_prefer_no_proxy(nw_parameters_t parameters, bool prefer_no_proxy);
|
|
1065
|
+
|
|
1066
|
+
/*!
|
|
1067
|
+
* @function nw_parameters_get_prefer_no_proxy
|
|
1068
|
+
*
|
|
1069
|
+
* @abstract
|
|
1070
|
+
* Indicates whether or not the parameters cause connections to be attempted without proxies, only using proxies
|
|
1071
|
+
* if connections cannot otherwise be completed.
|
|
1072
|
+
*
|
|
1073
|
+
* @param parameters
|
|
1074
|
+
* The parameters to get the property from.
|
|
1075
|
+
*
|
|
1076
|
+
* @result
|
|
1077
|
+
* Returns true if the parameters cause connections to be attempted without proxies, only using proxies if
|
|
1078
|
+
* connections cannot otherwise be completed.
|
|
1079
|
+
*/
|
|
1080
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
1081
|
+
bool
|
|
1082
|
+
nw_parameters_get_prefer_no_proxy(nw_parameters_t parameters);
|
|
1083
|
+
|
|
1084
|
+
#pragma mark - Resolution Options
|
|
1085
|
+
|
|
1086
|
+
/*!
|
|
1087
|
+
* @typedef nw_parameters_expired_dns_behavior_t
|
|
1088
|
+
* @abstract
|
|
1089
|
+
* Expired DNS behavior defines whether or not a connection will allow the use
|
|
1090
|
+
* of expired DNS answers during connection establishment.
|
|
1091
|
+
*/
|
|
1092
|
+
typedef enum {
|
|
1093
|
+
/*! @const nw_parameters_expired_dns_behavior_default Let the system determine whether or not to allow expired DNS answers */
|
|
1094
|
+
nw_parameters_expired_dns_behavior_default = 0,
|
|
1095
|
+
/*! @const nw_parameters_expired_dns_behavior_allow Explicitly allow the use of expired DNS answers */
|
|
1096
|
+
nw_parameters_expired_dns_behavior_allow = 1,
|
|
1097
|
+
/*! @const nw_parameters_expired_dns_behavior_allow Explicitly prohibit the use of expired DNS answers */
|
|
1098
|
+
nw_parameters_expired_dns_behavior_prohibit = 2,
|
|
1099
|
+
/*! @const nw_parameters_expired_dns_behavior_persistent Allow the use of expired DNS answers, and store answers in a persistent per-process cache.
|
|
1100
|
+
This should only be set for hostnames whose resolutions are not expected to change across networks. */
|
|
1101
|
+
nw_parameters_expired_dns_behavior_persistent
|
|
1102
|
+
API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0))
|
|
1103
|
+
= 3,
|
|
1104
|
+
} nw_parameters_expired_dns_behavior_t;
|
|
1105
|
+
|
|
1106
|
+
/*!
|
|
1107
|
+
* @function nw_parameters_set_expired_dns_behavior
|
|
1108
|
+
*
|
|
1109
|
+
* @abstract
|
|
1110
|
+
* Allow or prohibit the use of expired DNS answers during connection establishment.
|
|
1111
|
+
* If allowed, a DNS answer that was previously returned may be re-used for new
|
|
1112
|
+
* connections even after the answers are considered expired. A query for fresh answers
|
|
1113
|
+
* will be sent in parallel, and the fresh answers will be used as alternate addresses
|
|
1114
|
+
* in case the expired answers do not result in successful connections.
|
|
1115
|
+
*
|
|
1116
|
+
* By default, this value is nw_parameters_expired_dns_behavior_default, which allows
|
|
1117
|
+
* the system to determine if it is appropriate to use expired answers.
|
|
1118
|
+
*
|
|
1119
|
+
* @param parameters
|
|
1120
|
+
* The parameters to modify.
|
|
1121
|
+
*
|
|
1122
|
+
* @param expired_dns_behavior
|
|
1123
|
+
* Allow, prohibit, or use system default behavior for expired DNS answers.
|
|
1124
|
+
*/
|
|
1125
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
1126
|
+
void
|
|
1127
|
+
nw_parameters_set_expired_dns_behavior(nw_parameters_t parameters,
|
|
1128
|
+
nw_parameters_expired_dns_behavior_t expired_dns_behavior);
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
/*!
|
|
1132
|
+
* @function nw_parameters_get_expired_dns_behavior
|
|
1133
|
+
*
|
|
1134
|
+
* @abstract
|
|
1135
|
+
* Check the effective expired DNS behavior of a connection.
|
|
1136
|
+
* See nw_parameters_set_expired_dns_behavior() for a discussion on the use of expired
|
|
1137
|
+
* DNS answers.
|
|
1138
|
+
*
|
|
1139
|
+
* @param parameters
|
|
1140
|
+
* The parameters to check.
|
|
1141
|
+
*
|
|
1142
|
+
* @result
|
|
1143
|
+
* Returns the current effective expired DNS answer behavior.
|
|
1144
|
+
*/
|
|
1145
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
1146
|
+
nw_parameters_expired_dns_behavior_t
|
|
1147
|
+
nw_parameters_get_expired_dns_behavior(nw_parameters_t parameters);
|
|
1148
|
+
|
|
1149
|
+
/*!
|
|
1150
|
+
* @function nw_parameters_set_requires_dnssec_validation
|
|
1151
|
+
*
|
|
1152
|
+
* @abstract
|
|
1153
|
+
* Require to do or not to do DNSSEC validation when resolving the endpoint, before
|
|
1154
|
+
* making a connection.
|
|
1155
|
+
*
|
|
1156
|
+
* @param parameters
|
|
1157
|
+
* The parameters object to configure.
|
|
1158
|
+
*
|
|
1159
|
+
* @param requires_dnssec_validation
|
|
1160
|
+
* A boolean value that indicates if DNSSEC validation should be required
|
|
1161
|
+
* when doing DNS resolution for the endpoint.
|
|
1162
|
+
*
|
|
1163
|
+
* @discussion
|
|
1164
|
+
* DNSSEC validation only takes effect if making a connection to an
|
|
1165
|
+
* endpoint that requires domain name resolution, such as:
|
|
1166
|
+
* <code>nw_endpoint_type_host</code>
|
|
1167
|
+
* <code>nw_endpoint_type_url</code>
|
|
1168
|
+
*
|
|
1169
|
+
* 1. If this property is not set or is set to false on the parameters, DNSSEC
|
|
1170
|
+
* validation will not be required.
|
|
1171
|
+
*
|
|
1172
|
+
* 2. If this property is set to true and no additional DNSSEC
|
|
1173
|
+
* configuration is set on the parameters, the default behavior will be
|
|
1174
|
+
* followed: Only DNSSEC secure and DNSSEC insecure resolved result will be
|
|
1175
|
+
* used to establish a connection.
|
|
1176
|
+
*
|
|
1177
|
+
* 3. If this property is set to true and additional DNSSEC configuration
|
|
1178
|
+
* is set on the parameters, the behavior specified by that configuration
|
|
1179
|
+
* will be followed.
|
|
1180
|
+
*/
|
|
1181
|
+
API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
|
|
1182
|
+
void
|
|
1183
|
+
nw_parameters_set_requires_dnssec_validation(nw_parameters_t parameters, bool requires_dnssec_validation);
|
|
1184
|
+
|
|
1185
|
+
/*!
|
|
1186
|
+
* @function nw_parameters_requires_dnssec_validation
|
|
1187
|
+
*
|
|
1188
|
+
* @abstract
|
|
1189
|
+
* Check if DNSSEC validation is required.
|
|
1190
|
+
*
|
|
1191
|
+
* @param parameters
|
|
1192
|
+
* The parameters object to check.
|
|
1193
|
+
*
|
|
1194
|
+
* @result
|
|
1195
|
+
* Returns true if DNSSEC validation is required, false otherwise.
|
|
1196
|
+
*/
|
|
1197
|
+
API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0))
|
|
1198
|
+
bool
|
|
1199
|
+
nw_parameters_requires_dnssec_validation(nw_parameters_t parameters);
|
|
1200
|
+
|
|
1201
|
+
NW_ASSUME_NONNULL_END
|
|
1202
|
+
|
|
1203
|
+
__END_DECLS
|
|
1204
|
+
|
|
1205
|
+
#endif /* defined(__NW_PARAMETERS_H__) */
|