NativeBridge
@objc(UANativeBridge)
@MainActor
public 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
@objc @MainActor public weak var nativeBridgeDelegate: NativeBridgeDelegate?
-
Optional delegate to forward any WKNavigationDelegate calls.
Declaration
Swift
@objc @MainActor public weak var forwardNavigationDelegate: UANavigationDelegate?
-
Optional delegate to support custom JavaScript commands.
Declaration
Swift
@objc @MainActor public weak var javaScriptCommandDelegate: JavaScriptCommandDelegate?
-
Optional delegate to extend the native bridge.
Declaration
Swift
@objc @MainActor public weak var nativeBridgeExtensionDelegate: NativeBridgeExtensionDelegate?
-
NativeBridge initializer.
Declaration
Swift
@MainActor public convenience override init()
-
NativeBridge initializer.
Declaration
Swift
@MainActor public convenience init(actionRunner: NativeBridgeActionRunner)
Parameters
actionRunner
An action runner to run actions triggered from the web view