Affects Version/s: None
OS: Mac OS X 10.8.2
Titanium SDK: 3.0.2
iOS device: iPhone 3GS running iOS 6.0.1
If instead of creating the HTML dynamically and setting it via the html property or the setHtml method, I save the HTML to a local HTML file and load it via the Webview.url property, it then works as expected on both the simulator and the device, so the issue seems to be specifically related to the Webview.html property.
Also, in Titanium SDK 3.0.0 this worked fine, but it stopped working in 3.0.2.
To reproduce, create the following simple app.js file:
And in localjs/local.js under Resources directory:
Then make sure you are using SDK 3.0.2 and run app.js.
Expected: The app should load up the webview, and you should be able to click on the "Click Me!" text and you should see the corresponding alert() and Ti.API.info message.
Actual: Using 3.0.2, on simulator, it works, but when you run it on the iOS device, nothing happens when you click on "Click Me!" text (no alert and no TI log message). And also while viewing the console log on the device via Xcode, you don't see the expected debug message saying that the local.js was loaded. If you revert to SDK 3.0.0 it works on the device as expected.
Further notes: If instead of setting the Webview.html or using the Webview.setHtml() method, you save the HTML to a local file and then load that local file in the webview via Webview.url, then it seems to work in all cases. However for my purposes I need to dynamically generate HTML so it is not an ideal workaround to use static local files.