I have an iPhone app where I'd like to load a remotely served HTML form into a UIWebView and then populate that form as data becomes available from an external accessory using the "External Accessory Framework." Right now the data is entered by hand. The proposed flow is:
Is it possible to do this by "injecting" data from the external accessory into the UIWebView when all required data has been retrieved from the external accessory? I cannot seem to find any good examples on how to use the external accessory framework to achieve this.
While I haven't mucked with changing form fields myself, I think you can use UIWebView
's stringByEvaluatingJavaScriptFromString:
method to run arbitrary JavaScript to manipulate the DOM and set those form fields as desired.