I know how to send message from JS to native IOS swift app:
func userContentController(userContentController: WKUserContentController!, didReceiveScriptMessage message: WKScriptMessage!) {
println("JavaScript is sending a message \(message.body)")
}
and JS:
webkit.messageHandlers.callbackHandler.postMessage("Hello from JavaScript");
My question: is it possible to directly call a function in the native app rather then receiving the message in my example code.
say i want in the JS to use something like:
webkit.messageHandlers.someFunctionName()
The reason i am asking is that In Android thats how it works