There is bidirectional communication with the UIWebView, but it is a little convoluted.
You can use stringByEvaluatingJavaScriptFromString
to execute any javascript in the context of the web page. That can be used to send data to the web page, modify forms, or poll for data and events.
You can use webView:shouldStartLoadWithRequest:navigationType:
to receive notifications from the web view. Define a custom scheme like myapp:
and handle all such requests returning NO from shouldStart. You can use ajax style calls to trigger the notifications, although the actual ajax call will always fail because you are returning NO.
If you want to have a custom keyboard show up, you must send a notification to the host application via your custom scheme, display a UITextView over the web view, then send the results back via javascript.
At least, that is the documented way to do it.