NativeBridge
@MainActor
public final class NativeBridge : NSObject, WKNavigationDelegate
The native bridge will automatically load the Airship JavaScript environment into whitlelisted sites. The native
bridge must be assigned as the navigation delegate on a WKWebView in order to function.
-
Delegate to support additional native bridge features such as
close.Declaration
Swift
@MainActor public weak var nativeBridgeDelegate: (any NativeBridgeDelegate)? -
Optional delegate to forward any WKNavigationDelegate calls.
Declaration
Swift
@MainActor public weak var forwardNavigationDelegate: (any AirshipWKNavigationDelegate)? -
Optional delegate to support custom JavaScript commands.
Declaration
Swift
@MainActor public weak var javaScriptCommandDelegate: (any JavaScriptCommandDelegate)? -
Optional delegate to extend the native bridge.
Declaration
Swift
@MainActor public weak var nativeBridgeExtensionDelegate: (any NativeBridgeExtensionDelegate)? -
NativeBridge initializer.
Declaration
Swift
@MainActor public convenience override init() -
NativeBridge initializer.
Declaration
Swift
@MainActor public convenience init(actionRunner: any NativeBridgeActionRunner)Parameters
actionRunnerAn action runner to run actions triggered from the web view
View on GitHub