views:

48

answers:

2

I have code that works great in 3.2 and earlier. The javascript from my UIWebView Load - never seems to execute... Any idea what changed with 4.0 that might cause a problem...?

  • my current code has a bunch of javascript in the page to load and format - one of the things is a variable that indicates the javascript prep is done... I am checking that at 0.5 second intervals with a call [webView stringByEvaluatingJavaScriptFromString:@"fsready"]

When that is set to 1 - I proceed... I have tried showing the window etc -- it looks like it never loads. I have taken the html that I am loading and confirmed it all works in Safari -- even mobile safari. Again - running the same thing on 3.2 or earlier works find on the device as well...

Ideas?

A: 

I'm having this same problem, but only on the device itself (everything works fine on the simulator).

jack
There must be a timing thing with the javascript execution... Mine doesn't even work in the simulator, but all works just fine in 3.x - including on the iPad...
Jay Van Vark
Mine turns out to be the complexity of the javascript... Still chasing down a solution, but the javascript works fine in mobile safari, but no return and no error in UIWebView... Debugging the old fashion way... Taking parts out and rebuilding to see what will work...
Jay Van Vark
A: 

we ended up finding that there is an issue with how iOS 4.0 handles the accelerometer. We ended up taking the accelerometer code out of our app.. and everything started working.

jack