diff --git a/ios/Capacitor/Capacitor/CAPWebView.swift b/ios/Capacitor/Capacitor/CAPWebView.swift index 793fc25a4a..2025e261d0 100644 --- a/ios/Capacitor/Capacitor/CAPWebView.swift +++ b/ios/Capacitor/Capacitor/CAPWebView.swift @@ -25,13 +25,15 @@ open class CAPWebView: UIView { private lazy var configuration = InstanceConfiguration(with: configDescriptor, isDebug: CapacitorBridge.isDevEnvironment) private lazy var assetHandler: WebViewAssetHandler = { - let handler = WebViewAssetHandler(router: _Router()) + let handler = WebViewAssetHandler(router: router) handler.setAssetPath(configuration.appLocation.path) return handler }() private lazy var delegationHandler = WebViewDelegationHandler() + open var router: Router { _Router() } + public required init?(coder: NSCoder) { super.init(coder: coder) setup()