iOS-WKWebViewBridgeExample-Swift
iOS-WKWebViewBridgeExample-Swift copied to clipboard
Add clean up instructions to prevent memory leaks
You should add the following in the view controllers deinit
deinit { webView.configuration.userContentController.removeScriptMessageHandlerForName("buttonClicked") webView.configuration.userContentController.removeAllUserScripts() }