Phonegap Xcode iOS app crashes when status bar is tapped

前端 未结 1 1682
孤独总比滥情好
孤独总比滥情好 2021-01-27 04:51

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 tr

相关标签:
1条回答
  • 2021-01-27 05:21

    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.

    0 讨论(0)
提交回复
热议问题