I have a piece of JS that has been tested on a static HTML page and works fine. I need to call this JS from an HTML file stored in the bundle of my iOS app. The JS itself does a little song and dance on the DOM and displays a div on top top of the rendered page.
When I call this file from a UIWebView I cannot see the JS in action, the DIV is not displayed over the normal HTML.
If I open the remote inspector, copy/paste the HTML into a file and open it from disk, everything works fine. But if I just open the UIWebView, nothing works.
How can I debug this?
For those who are desperate, apparently the only way to debug JS in a UIWebView is with caveman methods. Basically alert() everything that looks suspicious.