cancelTunnelWithError
TypeScriptcancelTunnelWithError(error?: (NativeError) | null): voidSwift declarationfunc cancelTunnelWithError(_ error: (any Error)?)class · iOS 9.0+ · SDK 27.1
class NEPacketTunnelProvidercancelTunnelWithError(error?: (NativeError) | null): voidSwift declarationfunc cancelTunnelWithError(_ error: (any Error)?)static init(): NEPacketTunnelProviderSwift declarationinit()startTunnel(options: (Record<string, _ObjectiveC_NSObject>) | null, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declarationfunc startTunnel(options: [String : NSObject]? = nil) async throwsstopTunnel(reason: NEProviderStopReason, completionHandler: (() => void)): voidSwift declarationfunc stopTunnel(with reason: NEProviderStopReason) asyncget packetFlow(): NEPacketTunnelFlowSwift declarationvar packetFlow: NEPacketTunnelFlow { get }get virtualInterface(): (_Network_NWInterface) | nullSwift declarationvar virtualInterface: NWInterface? { get }The virtual network interface used to route packets to the packet tunnel provider. For NEPacketTunnelProvider sub-classes, this property will be non-nil when `NEPacketTunnelProvider.startTunnel(options:)` is called. For NEEthernetTunnelProvider sub-classes, this property will be non-nil after `NETunnelProvider.setTunnelNetworkSettings(_:)` returns. To create a connection through the tunnel, set this interface as `NWParameters.requiredInterface`.
2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
NEPacketTunnelProvider.createTCPConnectionThroughTunnel(to:enableTLS:tlsParameters:delegate:)
The iOS SDK compiler rejected this binding: 'NWEndpoint' is ambiguous for type lookup in this context
NEPacketTunnelProvider.createUDPSessionThroughTunnel(to:from:)
The iOS SDK compiler rejected this binding: 'NWEndpoint' is ambiguous for type lookup in this context