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,438 @@
|
|
|
1
|
+
//
|
|
2
|
+
// listener.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2016-2019 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_LISTENER_H__
|
|
9
|
+
#define __NW_LISTENER_H__
|
|
10
|
+
|
|
11
|
+
#ifndef __NW_INDIRECT__
|
|
12
|
+
#warning "Please include <Network/Network.h> instead of this file directly."
|
|
13
|
+
#endif // __NW_INDIRECT__
|
|
14
|
+
|
|
15
|
+
#include <Network/connection.h>
|
|
16
|
+
#include <Network/connection_group.h>
|
|
17
|
+
#include <Network/advertise_descriptor.h>
|
|
18
|
+
#include <Network/error.h>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__BEGIN_DECLS
|
|
22
|
+
|
|
23
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
24
|
+
|
|
25
|
+
/*!
|
|
26
|
+
* @typedef nw_listener_t
|
|
27
|
+
* @abstract
|
|
28
|
+
* A Network Listener is an object that is able to receive incoming nw_connection_t
|
|
29
|
+
* objects by binding to a local endpoint. A listener will accept connections based
|
|
30
|
+
* on the protocols defined in its stack. For transport listeners (such as TCP and UDP),
|
|
31
|
+
* accepted connections will represent new local and remote address and port tuples.
|
|
32
|
+
* For listeners that include higher-level protocols that support multiplexing,
|
|
33
|
+
* accepted connections will represent multiplexed streams on a new or existing transport
|
|
34
|
+
* binding.
|
|
35
|
+
*
|
|
36
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
37
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
38
|
+
*/
|
|
39
|
+
#ifndef NW_LISTENER_IMPL
|
|
40
|
+
NW_OBJECT_DECL(nw_listener);
|
|
41
|
+
#endif // NW_LISTENER_IMPL
|
|
42
|
+
|
|
43
|
+
/*!
|
|
44
|
+
* @typedef nw_listener_state_t
|
|
45
|
+
* @abstract
|
|
46
|
+
* Listener states sent by nw_listener_set_state_changed_handler.
|
|
47
|
+
* States progress forward and do not move backwards.
|
|
48
|
+
*/
|
|
49
|
+
typedef enum {
|
|
50
|
+
/*!
|
|
51
|
+
* @const nw_listener_state_invalid The state of the listener is not valid. This state
|
|
52
|
+
* will never be delivered in the listener's state update handler, and can be treated as
|
|
53
|
+
* an unexpected value.
|
|
54
|
+
*/
|
|
55
|
+
nw_listener_state_invalid = 0,
|
|
56
|
+
/*! @const nw_listener_state_waiting The listener is waiting for a usable network before being able to receive connections */
|
|
57
|
+
nw_listener_state_waiting = 1,
|
|
58
|
+
/*! @const nw_listener_state_ready The listener is ready and able to accept incoming connections */
|
|
59
|
+
nw_listener_state_ready = 2,
|
|
60
|
+
/*! @const nw_listener_state_failed The listener has irrecoverably closed or failed */
|
|
61
|
+
nw_listener_state_failed = 3,
|
|
62
|
+
/*! @const nw_listener_state_cancelled The listener has been cancelled by the caller */
|
|
63
|
+
nw_listener_state_cancelled = 4,
|
|
64
|
+
} nw_listener_state_t;
|
|
65
|
+
|
|
66
|
+
/*!
|
|
67
|
+
* @function nw_listener_create_with_port
|
|
68
|
+
*
|
|
69
|
+
* @abstract
|
|
70
|
+
* Creates a networking listener bound to a specified local port.
|
|
71
|
+
*
|
|
72
|
+
* @param port
|
|
73
|
+
* A port number as a C string, such as "443", or a service
|
|
74
|
+
* name, such as "https".
|
|
75
|
+
*
|
|
76
|
+
* @param parameters
|
|
77
|
+
* The parameters to use for the listener. These include the protocols to be
|
|
78
|
+
* used for the listener.
|
|
79
|
+
*
|
|
80
|
+
* @result
|
|
81
|
+
* Returns an allocated nw_listener_t object on success.
|
|
82
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
83
|
+
* These objects support ARC.
|
|
84
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
85
|
+
*/
|
|
86
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
87
|
+
NW_RETURNS_RETAINED _Nullable nw_listener_t
|
|
88
|
+
nw_listener_create_with_port(const char *port, nw_parameters_t parameters);
|
|
89
|
+
|
|
90
|
+
/*!
|
|
91
|
+
* @function nw_listener_create_with_launchd_key
|
|
92
|
+
*
|
|
93
|
+
* @abstract
|
|
94
|
+
* Creates a network listener from a launchd key.
|
|
95
|
+
*
|
|
96
|
+
* @param parameters
|
|
97
|
+
* The parameters to use for the listener. These include the protocols to be
|
|
98
|
+
* used for the listener. Since launchd creates the listening sockets, these
|
|
99
|
+
* parameters may not be applied in all cases.
|
|
100
|
+
*
|
|
101
|
+
* @param launchd_key
|
|
102
|
+
* The name of the socket entry as specified in the launchd.plist.
|
|
103
|
+
*
|
|
104
|
+
* @result
|
|
105
|
+
* Returns an allocated nw_listener_t object.
|
|
106
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
107
|
+
* These objects support ARC.
|
|
108
|
+
*/
|
|
109
|
+
API_AVAILABLE(macos(10.14)) API_UNAVAILABLE(ios, watchos, tvos)
|
|
110
|
+
NW_RETURNS_RETAINED nw_listener_t
|
|
111
|
+
nw_listener_create_with_launchd_key(nw_parameters_t parameters, const char *launchd_key);
|
|
112
|
+
|
|
113
|
+
/*!
|
|
114
|
+
* @function nw_listener_create
|
|
115
|
+
*
|
|
116
|
+
* @abstract
|
|
117
|
+
* Creates a networking listener. The listener will be assigned a random
|
|
118
|
+
* port upon which to listen unless otherwise specified by the parameters.
|
|
119
|
+
*
|
|
120
|
+
* @param parameters
|
|
121
|
+
* The parameters to use for the listener. These include the protocols to be
|
|
122
|
+
* used for the listener.
|
|
123
|
+
*
|
|
124
|
+
* @result
|
|
125
|
+
* Returns an allocated nw_listener_t object on success.
|
|
126
|
+
* Callers are responsible for deallocating using nw_release(obj) or [obj release].
|
|
127
|
+
* These objects support ARC.
|
|
128
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
129
|
+
*/
|
|
130
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
131
|
+
NW_RETURNS_RETAINED _Nullable nw_listener_t
|
|
132
|
+
nw_listener_create(nw_parameters_t parameters);
|
|
133
|
+
|
|
134
|
+
/*!
|
|
135
|
+
* @function nw_listener_create_with_connection
|
|
136
|
+
*
|
|
137
|
+
* @abstract
|
|
138
|
+
* Creates a networking listener based on an existing
|
|
139
|
+
* multiplexing connection. If there are multiple protocols
|
|
140
|
+
* in the connection that support listening for incoming flows,
|
|
141
|
+
* the listener will be hooked up the highest in the stack
|
|
142
|
+
* (the closest to the reading and writing of the client data).
|
|
143
|
+
*
|
|
144
|
+
* @param connection
|
|
145
|
+
* An existing connection that has a multiplexing protocol
|
|
146
|
+
* that supports receiving new connections.
|
|
147
|
+
*
|
|
148
|
+
* @param parameters
|
|
149
|
+
* The parameters to use for the listener. The protocol stack
|
|
150
|
+
* defined in the parameters must be able to join a protocol
|
|
151
|
+
* in the connection that supports listening protocols.
|
|
152
|
+
*
|
|
153
|
+
* @result
|
|
154
|
+
* Returns an allocated nw_listener_t object on success. Use nw_release() to deallocate.
|
|
155
|
+
* Returns NULL on failure. Fails due to invalid parameters.
|
|
156
|
+
*/
|
|
157
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
158
|
+
NW_RETURNS_RETAINED _Nullable nw_listener_t
|
|
159
|
+
nw_listener_create_with_connection(nw_connection_t connection,
|
|
160
|
+
nw_parameters_t parameters);
|
|
161
|
+
|
|
162
|
+
/*!
|
|
163
|
+
* @function nw_listener_set_queue
|
|
164
|
+
*
|
|
165
|
+
* @abstract
|
|
166
|
+
* Sets the client callback queue, on which blocks for events will
|
|
167
|
+
* be scheduled. This must be done before calling nw_listener_start().
|
|
168
|
+
*
|
|
169
|
+
* @param listener
|
|
170
|
+
* The listener object.
|
|
171
|
+
*
|
|
172
|
+
* @param queue
|
|
173
|
+
* The client's dispatch queue.
|
|
174
|
+
*/
|
|
175
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
176
|
+
void
|
|
177
|
+
nw_listener_set_queue(nw_listener_t listener,
|
|
178
|
+
dispatch_queue_t queue);
|
|
179
|
+
|
|
180
|
+
#ifdef __BLOCKS__
|
|
181
|
+
|
|
182
|
+
typedef void (^nw_listener_state_changed_handler_t)(nw_listener_state_t state, _Nullable nw_error_t error);
|
|
183
|
+
|
|
184
|
+
/*!
|
|
185
|
+
* @function nw_listener_set_state_changed_handler
|
|
186
|
+
*
|
|
187
|
+
* @abstract
|
|
188
|
+
* Sets the state change handler. For clients that need to perform cleanup when the
|
|
189
|
+
* connection has been cancelled, the nw_listener_state_cancelled state will
|
|
190
|
+
* be delivered last.
|
|
191
|
+
*
|
|
192
|
+
* @param listener
|
|
193
|
+
* The listener object.
|
|
194
|
+
*
|
|
195
|
+
* @param handler
|
|
196
|
+
* The state changed handler to call when the listener state changes.
|
|
197
|
+
* Pass NULL to remove the event handler.
|
|
198
|
+
*/
|
|
199
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
200
|
+
void
|
|
201
|
+
nw_listener_set_state_changed_handler(nw_listener_t listener,
|
|
202
|
+
_Nullable nw_listener_state_changed_handler_t handler);
|
|
203
|
+
|
|
204
|
+
/*!
|
|
205
|
+
* @typedef nw_listener_new_connection_handler_t
|
|
206
|
+
*
|
|
207
|
+
* @abstract
|
|
208
|
+
* The block called to notify client of a new connection.
|
|
209
|
+
*
|
|
210
|
+
* @param connection
|
|
211
|
+
* The new connection object. This connection is not yet started. Set the
|
|
212
|
+
* event handler and other settings on the connection before calling start.
|
|
213
|
+
*/
|
|
214
|
+
typedef void (^nw_listener_new_connection_handler_t)(nw_connection_t connection);
|
|
215
|
+
|
|
216
|
+
/*!
|
|
217
|
+
* @function nw_listener_set_new_connection_handler
|
|
218
|
+
*
|
|
219
|
+
* @abstract
|
|
220
|
+
* Sets the client new connection handler. Must be called before
|
|
221
|
+
* nw_listener_start.
|
|
222
|
+
*
|
|
223
|
+
* @param listener
|
|
224
|
+
* The listener object.
|
|
225
|
+
*
|
|
226
|
+
* @param handler
|
|
227
|
+
* The event handler to call when the listener receives a new connection.
|
|
228
|
+
* Pass NULL to remove the new connection handler.
|
|
229
|
+
*/
|
|
230
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
231
|
+
void
|
|
232
|
+
nw_listener_set_new_connection_handler(nw_listener_t listener,
|
|
233
|
+
_Nullable nw_listener_new_connection_handler_t handler);
|
|
234
|
+
|
|
235
|
+
/*!
|
|
236
|
+
* @typedef nw_listener_new_connection_group_handler_t
|
|
237
|
+
*
|
|
238
|
+
* @abstract
|
|
239
|
+
* The block called to notify the client of a new connection group.
|
|
240
|
+
*
|
|
241
|
+
* @param connection_group
|
|
242
|
+
* The new connection group object. This connection group is not yet started. Set the
|
|
243
|
+
* event handler and other settings on the connection group before calling start.
|
|
244
|
+
*/
|
|
245
|
+
typedef void (^nw_listener_new_connection_group_handler_t)(nw_connection_group_t connection_group);
|
|
246
|
+
|
|
247
|
+
/*!
|
|
248
|
+
* @function nw_listener_set_new_connection_group_handler
|
|
249
|
+
*
|
|
250
|
+
* @abstract
|
|
251
|
+
* Sets a new connection group handler to be called upon receiving an incoming
|
|
252
|
+
* connection that has a multiplexing protocol in its connected protocol stack.
|
|
253
|
+
* Must be called before nw_listener_start. Note that this handler is mutually
|
|
254
|
+
* exclusive with the new connection handler that is set via
|
|
255
|
+
* nw_listener_set_new_connection_handler. Only one of these handlers may
|
|
256
|
+
* be set at one time.
|
|
257
|
+
*
|
|
258
|
+
* @param listener
|
|
259
|
+
* The listener object.
|
|
260
|
+
*
|
|
261
|
+
* @param handler
|
|
262
|
+
* The event handler to call when the listener receives a new connection group.
|
|
263
|
+
* Pass NULL to remove the new connection group handler.
|
|
264
|
+
*/
|
|
265
|
+
API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0))
|
|
266
|
+
void
|
|
267
|
+
nw_listener_set_new_connection_group_handler(nw_listener_t listener,
|
|
268
|
+
_Nullable nw_listener_new_connection_group_handler_t handler);
|
|
269
|
+
|
|
270
|
+
#endif // __BLOCKS__
|
|
271
|
+
|
|
272
|
+
/*!
|
|
273
|
+
* @define NW_LISTENER_INFINITE_CONNECTION_LIMIT
|
|
274
|
+
* @discussion This value indicates that a listener should not limit incoming connections
|
|
275
|
+
*/
|
|
276
|
+
#define NW_LISTENER_INFINITE_CONNECTION_LIMIT UINT32_MAX
|
|
277
|
+
|
|
278
|
+
/*!
|
|
279
|
+
* @function nw_listener_get_new_connection_limit
|
|
280
|
+
*
|
|
281
|
+
* @abstract
|
|
282
|
+
* Gets the listener new connection limit. The default value is
|
|
283
|
+
* NW_LISTENER_INFINITE_CONNECTION_LIMIT which indicates that
|
|
284
|
+
* the listener should not limit incoming connections. If the value
|
|
285
|
+
* is not NW_LISTENER_INFINITE_CONNECTION_LIMIT, it will be decremented
|
|
286
|
+
* by 1 every time a new connection is created. When the value becomes
|
|
287
|
+
* 0, new connection handlers will no longer be invoked until
|
|
288
|
+
* nw_listener_set_new_connection_limit() is invoked with a value
|
|
289
|
+
* that is greater than 0. Incoming connections will eventually be rejected
|
|
290
|
+
* if nw_listener_set_new_connection_limit() is not called after the connection
|
|
291
|
+
* limit reaches 0.
|
|
292
|
+
*
|
|
293
|
+
* @param listener
|
|
294
|
+
* The listener object.
|
|
295
|
+
*
|
|
296
|
+
* @result
|
|
297
|
+
* Returns current new connection limit
|
|
298
|
+
*/
|
|
299
|
+
API_AVAILABLE(macos(10.15), ios(12.0), watchos(5.0), tvos(12.0))
|
|
300
|
+
uint32_t
|
|
301
|
+
nw_listener_get_new_connection_limit(nw_listener_t listener);
|
|
302
|
+
|
|
303
|
+
/*!
|
|
304
|
+
* @function nw_listener_set_new_connection_limit
|
|
305
|
+
*
|
|
306
|
+
* @abstract
|
|
307
|
+
* Sets the listener new connection limit. Use the value NW_LISTENER_INFINITE_CONNECTION_LIMIT
|
|
308
|
+
* to disable connection limits. If the value is not NW_LISTENER_INFINITE_CONNECTION_LIMIT,
|
|
309
|
+
* it will be decremented by 1 every time a new connection is created. When the value becomes
|
|
310
|
+
* 0, new connection handlers will no longer be invoked until
|
|
311
|
+
* nw_listener_set_new_connection_limit() is invoked with a value
|
|
312
|
+
* that is greater than 0. Incoming connections will eventually be rejected
|
|
313
|
+
* if nw_listener_set_new_connection_limit() is not called after the connection
|
|
314
|
+
* limit reaches 0.
|
|
315
|
+
*
|
|
316
|
+
* @param listener
|
|
317
|
+
* The listener object.
|
|
318
|
+
*
|
|
319
|
+
* @param new_connection_limit
|
|
320
|
+
* The new connection limit. Pass NW_LISTENER_INFINITE_CONNECTION_LIMIT
|
|
321
|
+
* to disable new connection limiting.
|
|
322
|
+
*/
|
|
323
|
+
API_AVAILABLE(macos(10.15), ios(12.0), watchos(5.0), tvos(12.0))
|
|
324
|
+
void
|
|
325
|
+
nw_listener_set_new_connection_limit(nw_listener_t listener,
|
|
326
|
+
uint32_t new_connection_limit);
|
|
327
|
+
|
|
328
|
+
/*!
|
|
329
|
+
* @function nw_listener_set_advertise_descriptor
|
|
330
|
+
*
|
|
331
|
+
* @abstract
|
|
332
|
+
* Describes the bonjour service the listener should register. Setting the
|
|
333
|
+
* advertise descriptor more than once may be used to update the TXT record.
|
|
334
|
+
*
|
|
335
|
+
* @param listener
|
|
336
|
+
* The listener object.
|
|
337
|
+
*
|
|
338
|
+
* @param advertise_descriptor
|
|
339
|
+
* The advertise_descriptor or NULL to prevent or remove registration of a service.
|
|
340
|
+
*/
|
|
341
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
342
|
+
void
|
|
343
|
+
nw_listener_set_advertise_descriptor(nw_listener_t listener,
|
|
344
|
+
_Nullable nw_advertise_descriptor_t advertise_descriptor);
|
|
345
|
+
|
|
346
|
+
#ifdef __BLOCKS__
|
|
347
|
+
|
|
348
|
+
/*!
|
|
349
|
+
* @typedef nw_listener_advertised_endpoint_changed_handler_t
|
|
350
|
+
*
|
|
351
|
+
* @abstract
|
|
352
|
+
* A block called to notify client of a change in advertised endpoints.
|
|
353
|
+
*
|
|
354
|
+
* @param advertised_endpoint
|
|
355
|
+
* An endpoint that is has been added or removed from the list of advertised
|
|
356
|
+
* endpoints for the listener.
|
|
357
|
+
*
|
|
358
|
+
* @param added
|
|
359
|
+
* A boolean indicating if the endpoint is being added or removed. If added,
|
|
360
|
+
* the value with be true; if removed, the value will be false.
|
|
361
|
+
*/
|
|
362
|
+
typedef void (^nw_listener_advertised_endpoint_changed_handler_t)(nw_endpoint_t advertised_endpoint,
|
|
363
|
+
bool added);
|
|
364
|
+
|
|
365
|
+
/*!
|
|
366
|
+
* @function nw_listener_set_advertised_endpoint_changed_handler
|
|
367
|
+
*
|
|
368
|
+
* @abstract
|
|
369
|
+
* Sets the client advertised endpoint changed handler. The handler will be
|
|
370
|
+
* invoked for listeners which have called nw_listener_set_advertise_descriptor().
|
|
371
|
+
*
|
|
372
|
+
* @param listener
|
|
373
|
+
* The listener object.
|
|
374
|
+
*
|
|
375
|
+
* @param handler
|
|
376
|
+
* The event handler to call when the listener adds or removes an advertised endpoint.
|
|
377
|
+
* Pass NULL to remove the handler.
|
|
378
|
+
*/
|
|
379
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
380
|
+
void
|
|
381
|
+
nw_listener_set_advertised_endpoint_changed_handler(nw_listener_t listener,
|
|
382
|
+
_Nullable nw_listener_advertised_endpoint_changed_handler_t handler);
|
|
383
|
+
|
|
384
|
+
#endif // __BLOCKS__
|
|
385
|
+
|
|
386
|
+
/*!
|
|
387
|
+
* @function nw_listener_get_port
|
|
388
|
+
*
|
|
389
|
+
* @abstract
|
|
390
|
+
* Gets the local port as a number in host byte order. If the listener was created with a
|
|
391
|
+
* port of 0 (let the system assign a port), nw_listener_get_port will return 0 until the
|
|
392
|
+
* listener is in the ready state.
|
|
393
|
+
*
|
|
394
|
+
* @param listener
|
|
395
|
+
* The listener to get the local port of.
|
|
396
|
+
*
|
|
397
|
+
* @result
|
|
398
|
+
* Returns a port in host byte order.
|
|
399
|
+
*/
|
|
400
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
401
|
+
uint16_t
|
|
402
|
+
nw_listener_get_port(nw_listener_t listener);
|
|
403
|
+
|
|
404
|
+
/*!
|
|
405
|
+
* @function nw_listener_start
|
|
406
|
+
*
|
|
407
|
+
* @abstract
|
|
408
|
+
* Starts the listener, which will cause the listener
|
|
409
|
+
* to start listening for inbound connections.
|
|
410
|
+
*
|
|
411
|
+
* @param listener
|
|
412
|
+
* The listener object.
|
|
413
|
+
*/
|
|
414
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
415
|
+
void
|
|
416
|
+
nw_listener_start(nw_listener_t listener);
|
|
417
|
+
|
|
418
|
+
/*!
|
|
419
|
+
* @function nw_listener_cancel
|
|
420
|
+
*
|
|
421
|
+
* @abstract
|
|
422
|
+
* Cancel the listener. This will de-register the listener from the system. The process
|
|
423
|
+
* of cancellation will be completed asynchronously, and the final callback event
|
|
424
|
+
* delivered to the caller will be a state update with a value of nw_listener_state_cancelled.
|
|
425
|
+
* Once this update is delivered, the caller may clean up any associated memory or objects.
|
|
426
|
+
*
|
|
427
|
+
* @param listener
|
|
428
|
+
* The listener object.
|
|
429
|
+
*/
|
|
430
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
431
|
+
void
|
|
432
|
+
nw_listener_cancel(nw_listener_t listener);
|
|
433
|
+
|
|
434
|
+
NW_ASSUME_NONNULL_END
|
|
435
|
+
|
|
436
|
+
__END_DECLS
|
|
437
|
+
|
|
438
|
+
#endif /* __NW_LISTENER_H__ */
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
//
|
|
2
|
+
// nw_object.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2016-2023 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_OBJECT_H__
|
|
9
|
+
#define __NW_OBJECT_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 <sys/cdefs.h>
|
|
16
|
+
#include <os/object.h>
|
|
17
|
+
#include <TargetConditionals.h> // TARGET_OS_*
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* By default, nw_objects are declared as Objective-C types when building
|
|
21
|
+
* with an Objective-C compiler. This allows them to participate in ARC, in RR
|
|
22
|
+
* management by the Blocks runtime and in leaks checking by the static
|
|
23
|
+
* analyzer, and enables them to be added to Cocoa collections.
|
|
24
|
+
* See <os/object.h> for details.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#if __has_attribute(__swift_attr__)
|
|
28
|
+
# define NW_SWIFT_SENDABLE __attribute__((swift_attr("@Sendable")))
|
|
29
|
+
#else // __has_attribute(__swift_attr__)
|
|
30
|
+
# define NW_SWIFT_SENDABLE
|
|
31
|
+
#endif // __has_attribute(__swift_attr__)
|
|
32
|
+
|
|
33
|
+
#ifndef NW_NO_DESTROY
|
|
34
|
+
# define NW_NO_DESTROY [[clang::no_destroy]]
|
|
35
|
+
#endif // NW_NO_DESTROY
|
|
36
|
+
|
|
37
|
+
#if OS_OBJECT_USE_OBJC
|
|
38
|
+
# define NW_OBJECT_DECL(type) OS_OBJECT_DECL(type)
|
|
39
|
+
# define NW_SENDABLE_OBJECT_DECL(type) NW_SWIFT_SENDABLE NW_OBJECT_DECL(type)
|
|
40
|
+
# define NW_OBJECT_DECL_SUBCLASS(type, super) OS_OBJECT_DECL_SUBCLASS(type, super)
|
|
41
|
+
#else // OS_OBJECT_USE_OBJC
|
|
42
|
+
# define NW_OBJECT_DECL(type) \
|
|
43
|
+
struct type; \
|
|
44
|
+
typedef struct type *type##_t
|
|
45
|
+
# define NW_OBJECT_DECL_SUBCLASS(type, super) \
|
|
46
|
+
typedef super##_t type##_t
|
|
47
|
+
# define NW_SENDABLE_OBJECT_DECL(type) NW_OBJECT_DECL(type)
|
|
48
|
+
#endif // OS_OBJECT_USE_OBJC
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
#if __has_feature(assume_nonnull)
|
|
52
|
+
# define NW_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
|
|
53
|
+
# define NW_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
|
|
54
|
+
#else // assume_nonnull
|
|
55
|
+
# define NW_ASSUME_NONNULL_BEGIN
|
|
56
|
+
# define NW_ASSUME_NONNULL_END
|
|
57
|
+
#endif // assume_nonnull
|
|
58
|
+
|
|
59
|
+
#if __has_feature(nullability_on_arrays)
|
|
60
|
+
# define NW_NONNULL_ARRAY _Nonnull
|
|
61
|
+
#else // nullability_on_arrays
|
|
62
|
+
# define NW_NONNULL_ARRAY
|
|
63
|
+
#endif// nullability_on_arrays
|
|
64
|
+
|
|
65
|
+
#ifndef __has_attribute
|
|
66
|
+
# define __has_attribute(x) 0
|
|
67
|
+
#endif // !__has_attribute
|
|
68
|
+
|
|
69
|
+
#ifndef NW_RETURNS_RETAINED
|
|
70
|
+
# define NW_RETURNS_RETAINED OS_OBJECT_RETURNS_RETAINED
|
|
71
|
+
#endif // !NW_RETURNS_RETAINED
|
|
72
|
+
|
|
73
|
+
#if __has_attribute(swift_async)
|
|
74
|
+
# define NW_SWIFT_DISABLE_ASYNC __attribute__((swift_async(none)))
|
|
75
|
+
#else // __has_attribute(swift_async)
|
|
76
|
+
# define NW_SWIFT_DISABLE_ASYNC
|
|
77
|
+
#endif // __has_attribute(swift_async)
|
|
78
|
+
|
|
79
|
+
#if defined(__OBJC__) && OS_OBJECT_USE_OBJC && __has_feature(attribute_ns_returns_not_retained)
|
|
80
|
+
# define NW_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
|
|
81
|
+
#else // __OBJC__ && OS_OBJECT_USE_OBJC && ns_returns_not_retained
|
|
82
|
+
# define NW_RETURNS_NOT_RETAINED
|
|
83
|
+
#endif // __OBJC__ && OS_OBJECT_USE_OBJC && ns_returns_not_retained
|
|
84
|
+
|
|
85
|
+
#if __has_attribute(noescape)
|
|
86
|
+
#define NW_NOESCAPE __attribute__((__noescape__))
|
|
87
|
+
#else // noescape
|
|
88
|
+
#define NW_NOESCAPE
|
|
89
|
+
#endif // noescape
|
|
90
|
+
|
|
91
|
+
#if __has_attribute(objc_direct)
|
|
92
|
+
#define NW_DIRECT __attribute__((objc_direct))
|
|
93
|
+
#else // objc_direct
|
|
94
|
+
#define NW_DIRECT
|
|
95
|
+
#endif // objc_direct
|
|
96
|
+
|
|
97
|
+
#if __has_attribute(objc_direct_members)
|
|
98
|
+
#define NW_DIRECT_MEMBERS __attribute__((objc_direct_members))
|
|
99
|
+
#else // objc_direct_members
|
|
100
|
+
#define NW_DIRECT_MEMBERS
|
|
101
|
+
#endif // objc_direct_members
|
|
102
|
+
|
|
103
|
+
#if defined(__OBJC__) && __has_attribute(ns_consumed)
|
|
104
|
+
# define NW_RELEASES_ARGUMENT __attribute__((__ns_consumed__))
|
|
105
|
+
#else // __OBJC__ && ns_consumed
|
|
106
|
+
# define NW_RELEASES_ARGUMENT
|
|
107
|
+
#endif // __OBJC__ && ns_consumed
|
|
108
|
+
|
|
109
|
+
#if defined(__OBJC__) && __has_attribute(objc_precise_lifetime)
|
|
110
|
+
# define NW_VALID_UNTIL_END_OF_SCOPE __attribute__((objc_precise_lifetime))
|
|
111
|
+
#else // __OBJC__ && objc_precise_lifetime
|
|
112
|
+
# define NW_VALID_UNTIL_END_OF_SCOPE
|
|
113
|
+
#endif // __OBJC__ && objc_precise_lifetime
|
|
114
|
+
|
|
115
|
+
#if defined(__OBJC__) && __has_attribute(objc_returns_inner_pointer)
|
|
116
|
+
# define NW_RETURNS_INNER_POINTER __attribute__((objc_returns_inner_pointer))
|
|
117
|
+
#else // __OBJC__ && objc_returns_inner_pointer
|
|
118
|
+
# define NW_RETURNS_INNER_POINTER
|
|
119
|
+
#endif // __OBJC__ && objc_returns_inner_pointer
|
|
120
|
+
|
|
121
|
+
#ifndef NW_UNSAFE_UNRETAINED
|
|
122
|
+
# if defined(__OBJC__) && OS_OBJECT_USE_OBJC
|
|
123
|
+
# define NW_UNSAFE_UNRETAINED __unsafe_unretained
|
|
124
|
+
# else // __OBJC__ && OS_OBJECT_USE_OBJC
|
|
125
|
+
# define NW_UNSAFE_UNRETAINED
|
|
126
|
+
# endif // __OBJC__ && OS_OBJECT_USE_OBJC
|
|
127
|
+
#endif // !NW_UNSAFE_UNRETAINED
|
|
128
|
+
|
|
129
|
+
#ifndef NW_EXTERNALLY_RETAINED
|
|
130
|
+
#if defined(__OBJC__) && __has_feature(objc_arc) && __has_attribute(objc_externally_retained)
|
|
131
|
+
# define NW_EXTERNALLY_RETAINED __attribute__((objc_externally_retained))
|
|
132
|
+
# define NW_ASSUME_EXTERNALLY_RETAINED_BEGIN _Pragma("clang attribute NW_ASSUME_EXTERNALLY_RETAINED.push(__attribute__((objc_externally_retained)), apply_to=any(function, block, objc_method))")
|
|
133
|
+
# define NW_ASSUME_EXTERNALLY_RETAINED_END _Pragma("clang attribute NW_ASSUME_EXTERNALLY_RETAINED.pop")
|
|
134
|
+
#else // __OBJC__ && objc_arc && objc_externally_retained
|
|
135
|
+
# define NW_EXTERNALLY_RETAINED
|
|
136
|
+
# define NW_ASSUME_EXTERNALLY_RETAINED_BEGIN
|
|
137
|
+
# define NW_ASSUME_EXTERNALLY_RETAINED_END
|
|
138
|
+
#endif // __OBJC__ && objc_arc && objc_externally_retained
|
|
139
|
+
#endif // !NW_EXTERNALLY_RETAINED
|
|
140
|
+
|
|
141
|
+
#ifndef NW_EXPORT
|
|
142
|
+
# define NW_EXPORT __attribute__((visibility("default")))
|
|
143
|
+
#endif // !NW_EXPORT
|
|
144
|
+
|
|
145
|
+
#ifndef NW_EXPORT_PROJECT
|
|
146
|
+
# define NW_EXPORT_PROJECT __attribute__((visibility("default")))
|
|
147
|
+
#endif // !NW_EXPORT_PROJECT
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
#if !OS_OBJECT_USE_OBJC_RETAIN_RELEASE
|
|
151
|
+
|
|
152
|
+
__BEGIN_DECLS
|
|
153
|
+
|
|
154
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
155
|
+
void *nw_retain(void *obj);
|
|
156
|
+
|
|
157
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
158
|
+
void nw_release(void *obj);
|
|
159
|
+
|
|
160
|
+
__END_DECLS
|
|
161
|
+
|
|
162
|
+
#else // !OS_OBJECT_USE_OBJC_RETAIN_RELEASE
|
|
163
|
+
|
|
164
|
+
#undef nw_retain
|
|
165
|
+
#undef nw_release
|
|
166
|
+
#define nw_retain(object) [(object) retain]
|
|
167
|
+
#define nw_release(object) [(object) release]
|
|
168
|
+
|
|
169
|
+
#endif // !OS_OBJECT_USE_OBJC_RETAIN_RELEASE
|
|
170
|
+
|
|
171
|
+
#ifndef NW_ENUM
|
|
172
|
+
#if __has_attribute(enum_extensibility)
|
|
173
|
+
#define __NW_ENUM_ATTRIBUTES __attribute__((enum_extensibility(open)))
|
|
174
|
+
#define __NW_OPTIONS_ATTRIBUTES __attribute__((flag_enum,enum_extensibility(open)))
|
|
175
|
+
#else // __has_attribute(enum_extensibility)
|
|
176
|
+
#define __NW_ENUM_ATTRIBUTES
|
|
177
|
+
#define __NW_OPTIONS_ATTRIBUTES
|
|
178
|
+
#endif // __has_attribute(enum_extensibility)
|
|
179
|
+
|
|
180
|
+
#define __NW_ENUM_GET_MACRO(_1, _2, NAME, ...) NAME
|
|
181
|
+
#if (defined(__cplusplus) && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!defined(__cplusplus) && __has_feature(objc_fixed_enum))
|
|
182
|
+
#define __NW_NAMED_ENUM(_type, _name) enum __NW_ENUM_ATTRIBUTES _name : _type _name; enum _name : _type
|
|
183
|
+
#define __NW_ANON_ENUM(_type) enum __NW_ENUM_ATTRIBUTES : _type
|
|
184
|
+
#if defined(__cplusplus)
|
|
185
|
+
#define NW_OPTIONS(_type, _name) _type _name; enum __NW_OPTIONS_ATTRIBUTES : _type
|
|
186
|
+
#else // defined(__cplusplus)
|
|
187
|
+
#define NW_OPTIONS(_type, _name) enum __NW_OPTIONS_ATTRIBUTES _name : _type _name; enum _name : _type
|
|
188
|
+
#endif // defined(__cplusplus)
|
|
189
|
+
#else // (defined(__cplusplus) && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!defined(__cplusplus) && __has_feature(objc_fixed_enum))
|
|
190
|
+
#define __NW_NAMED_ENUM(_type, _name) _type _name; enum
|
|
191
|
+
#define __NW_ANON_ENUM(_type) enum
|
|
192
|
+
#define NW_OPTIONS(_type, _name) _type _name; enum
|
|
193
|
+
#endif // (defined(__cplusplus) && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!defined(__cplusplus) && __has_feature(objc_fixed_enum))
|
|
194
|
+
#define NW_ENUM(...) __NW_ENUM_GET_MACRO(__VA_ARGS__, __NW_NAMED_ENUM, __NW_ANON_ENUM, )(__VA_ARGS__)
|
|
195
|
+
#endif // NW_ENUM
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
NW_OBJECT_DECL(nw_object);
|
|
199
|
+
|
|
200
|
+
#endif // __NW_OBJECT_H__
|