When working with Android, there is a method called addJavascriptInterface()
that allows you to import an Android JAVA object to the Javascript context. I am wondering if there is an equivalent of this on iOS.
I have searched for similar questions but haven't found a satisfactory solution:
androids-addjavascriptinterface-equivalent-in-ios
calling-objective-c-function-from-javascript-in-ios-applications
function initiateAddCall(){
var locus = reader.getPlace().getLocus();
RoomHelper.postReaderLocus(JSON.stringify(locus));
}
RoomHelper
is the JavaScript handler that I am using. Is there a way to implement something similar in UIWebView
on iOS?