How to work with native iOS and javascript callbacks in Objective-C
['Benoit Pasquier']
Benoit Pasquier - Swift, Data and more
I wanted to load web content from iOS with Javascript inside and get callbacks from Javascript into iOS, to save native data and transmit it to an other controller if needed. < form class = "form-signin" role = "form" > < div class = "form-content" > < label for = "email" class = "form-email" >Already an account?</ label > < input type = "email" id = "email" class = "form-control" placeholder = "Email" required autofocus /> < input type = "password" id = "password" class = "form-control" placeholder = "Password" required > < button class = "btn btn-lg btn-primary btn-block" type = "button" onClick = "sendLoginAction()" >Submit</ button > </ div > </ form > - ( void ) webViewDidFinishLoad: ( UIWebView * ) webView { JSContext * context = [ webView valueForKeyPath :…