Good day!
There is such a question: We have a UIViewController on which the UIWebView is located, in the process of working up in the UIWebView, the site is loaded in which there is a link
<a href="" onclick="mobile_app.performClick()">Проверить</a> So, when you click on this link in a mobile browser, you need to run some code in the classes of the application. In the Android version this is done like this -
w.addJavascriptInterface(new Object() { @SuppressWarnings("unused") public void performClick() { startScanActivity(); } }, where w = (WebView) findViewById (R.id.mainWebView);
THOSE. we intercept the JS onClick event and if it is equal to performClick, then we perform the functions of the application.
Task: repeat the same on iOS
I hope for your help! Thank you in advance!