在iPhone上运行PhoneGap0.9.6应用程序时出现异常

时间:2011-07-08 22:12:07

标签: iphone ios xcode cordova

我们有一个PhoneGap应用程序在使用模拟器时运行完全没问题,但是一旦在连接到mac的实际iPhone中运行它,我们会得到一个例外(下面的错误)。请注意,在升级到PhoneGap0.9.6 /

之前,应用程序运行正常
objc[356]: Class Connection is implemented in both /System/Library/PrivateFrameworks/Message.framework/Message and /var/mobile/Applications/D1D682A1-010B-4AE9-8761-4D553FCF8089/Frank151.app/Frank151. One of the two will be used. Which one is undefined.
[Switching to process 13059 thread 0x0]
2011-07-08 18:00:45.355 Frank151[356:707] -[Connection initWithWebView:]: unrecognized selector sent to instance 0x17e4e0
2011-07-08 18:00:45.378 Frank151[356:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Connection initWithWebView:]: unrecognized selector sent to instance 0x17e4e0'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x3166564f __exceptionPreprocess + 114
    1   libobjc.A.dylib                     0x35180c5d objc_exception_throw + 24
    2   CoreFoundation                      0x316691bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
    3   CoreFoundation                      0x31668649 ___forwarding___ + 508
    4   CoreFoundation                      0x315df180 _CF_forwarding_prep_0 + 48
    5   Frank151                            0x00017469 -[PhoneGapDelegate getCommandInstance:] + 164
    6   Frank151                            0x00002f7f -[AppDelegate getCommandInstance:] + 62
    7   Frank151                            0x00016807 -[PhoneGapDelegate deviceProperties] + 234
    8   Frank151                            0x00016475 -[PhoneGapDelegate webViewDidFinishLoad:] + 28
    9   Frank151                            0x00003071 -[AppDelegate webViewDidFinishLoad:] + 212
    10  UIKit                               0x318a9061 -[UIWebView webView:didFinishLoadForFrame:] + 244
    11  UIKit                               0x318a8427 -[UIWebViewWebViewDelegate webView:didFinishLoadForFrame:] + 22
    12  CoreFoundation                      0x316687a4 __invoking___ + 68
    13  CoreFoundation                      0x315e043d -[NSInvocation invoke] + 108
    14  CoreFoundation                      0x315e00d9 -[NSInvocation invokeWithTarget:] + 36
    15  WebKit                              0x345887bd -[_WebSafeForwarder forwardInvocation:] + 408
    16  CoreFoundation                      0x3166868d ___forwarding___ + 576
    17  CoreFoundation                      0x315df180 _CF_forwarding_prep_0 + 48
    18  CoreFoundation                      0x316687a4 __invoking___ + 68
    19  CoreFoundation                      0x315e043d -[NSInvocation invoke] + 108
    20  WebCore                             0x36c39c3d _ZL11SendMessageP12NSInvocation + 16
    21  WebCore                             0x36cdcadf _ZL20HandleDelegateSourcePv + 66
    22  CoreFoundation                      0x3163ca79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
    23  CoreFoundation                      0x3163e75f __CFRunLoopDoSources0 + 382
    24  CoreFoundation                      0x3163f4eb __CFRunLoopRun + 230
    25  CoreFoundation                      0x315cfec3 CFRunLoopRunSpecific + 230
    26  CoreFoundation                      0x315cfdcb CFRunLoopRunInMode + 58
    27  GraphicsServices                    0x30f4e41f GSEventRunModal + 114
    28  GraphicsServices                    0x30f4e4cb GSEventRun + 62
    29  UIKit                               0x316f5d69 -[UIApplication _run] + 404
    30  UIKit                               0x316f3807 UIApplicationMain + 670
    31  Frank151                            0x00002caf main + 78
    32  Frank151                            0x00002c5c start + 40
)
terminate called after throwing an instance of 'NSException'
[Switching to process 11779 thread 0x0]
(gdb) 

更新:在尝试了很多事情之后没多少运气后我们决定将应用程序降级到PG 0.9.5.1并且没有任何问题。不确定原因,但与PhoneGap 0.9.6升级有关。

1 个答案:

答案 0 :(得分:0)

首先禁用任何插件......

webView可能指的是ChildBrowser插件。