function connectWebViewJavascriptBridge (callback) { if (window.WebViewJavascriptBridge) { callback(WebViewJavascriptBridge) } else { document.addEventListener( ‘WebViewJavascriptBridgeReady‘ , function() { callback(WebViewJavascriptBridge) }, false ); } }
connectWebViewJavascriptBridge (function(bridge) {
// bridge.registerHandler(‘JS Echo‘, function(data, responseCallback) { console.log("JS Echo called with:", data) responseCallback(data) })
bridge.callHandler(‘oliveness‘, {}, function responseCallback(responseData) { }) })