1

I'm using Xcode 4.3.1 with Phonegap 1.4.1 to build an iPhone app. Whenever I tap the status bar to scroll to top, the app crashes with an EXC_BAD_ACCESS error.

I've tried implementing a number of suggestions such as this .

I've also tried adding variations of the below code:

[[[theWebView subviews] objectAtIndex:0] setScrollsToTop:NO];

((UIScrollView*)[theWebView.subviews objectAtIndex:0]).scrollsToTop = NO;

to the

- (void) webViewDidFinishLoad:(UIWebView*) theWebView 
{
 ...
}

within the AppDelegate.m

However, I've have been unable to resolve the issue. My main concern is to stop the app form crashing, any insight would be greatly appreciated.

Community
  • 1
  • 1
Charlie W
  • 39
  • 7

1 Answers1

0

I am using cordova 1.7 and have the same problem. I found a workaround though. You need to patch phonegap by commenting out the creation of invsible iframe which is injected by phonegap to communicate with the native side. In fact, this iframe causes all kinds of rendering issues, not only the status bar problem:

if (cordova.commandQueue.length == 1 && !cordova.commandQueueFlushing) {
//        if (!gapBridge) {
//            createGapBridge();
//        }
//        gapBridge.src = "gap://ready";
    location = "gap://ready";
}

I didn't find any side effects after I've made the above change. However, I know people complain that some plugins stopped working, e.g. google analytics.

GregK
  • 1,653
  • 2
  • 15
  • 19