Titanium WebView在加载URL方案时崩溃

时间:2014-03-26 13:10:39

标签: titanium

我使用Titanium Studio制作了一款iPhone应用程序。 我使用了WebView组件。

当javascript代码执行时,iPhone应用程序崩溃。

window.location = "urlscheme://page_loaded";

我应该如何避免它?

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: source)'
[INFO] :   *** First throw call stack:
[INFO] :   (
[INFO] :    0   CoreFoundation                      0x0488f1e4 __exceptionPreprocess + 180
[INFO] :    1   libobjc.A.dylib                     0x043428e5 objc_exception_throw + 44
[INFO] :    2   CoreFoundation                      0x04918eb8 -[__NSDictionaryM setObject:forKey:] + 888
[INFO] :    3   Appname                             0x001fd8de -[TiApp application:openURL:sourceApplication:annotation:] + 318
[INFO] :    4   UIKit                               0x018662f6 -[UIApplication _applicationOpenURL:payload:] + 318
[INFO] :    5   UIKit                               0x0186634b -[UIApplication _applicationOpenURL:event:] + 51
[INFO] :    6   UIKit                               0x01872095 -[UIApplication handleEvent:withNewEvent:] + 3776
[INFO] :    7   UIKit                               0x01872555 -[UIApplication sendEvent:] + 85
[INFO] :    8   UIKit                               0x0185f250 _UIApplicationHandleEvent + 683
[INFO] :    9   GraphicsServices                    0x04aedf02 _PurpleEventCallback + 776
[INFO] :    10  GraphicsServices                    0x04aeda0d PurpleEventCallback + 46
[INFO] :    11  CoreFoundation                      0x0480aca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
[INFO] :    12  CoreFoundation                      0x0480a9db __CFRunLoopDoSource1 + 523
[INFO] :    13  CoreFoundation                      0x0483568c __CFRunLoopRun + 2156
[INFO] :    14  CoreFoundation                      0x048349d3 CFRunLoopRunSpecific + 467
[INFO] :    15  CoreFoundation                      0x048347eb CFRunLoopRunInMode + 123
[INFO] :    16  GraphicsServices                    0x04aec5ee GSEventRunModal + 192
[INFO] :    17  GraphicsServices                    0x04aec42b GSEventRun + 104
[INFO] :    18  UIKit                               0x0185ef9b UIApplicationMain + 1225
[INFO] :    19  Appname                             0x00003348 main + 456
[INFO] :    20  libdyld.dylib                       0x0512e725 start + 0
[INFO] :   )
[INFO] :   libc++abi.dylib: terminating with uncaught exception of type NSException

环境:

  • iOS模拟器版本7.1(463.9.41)
  • Xcode版本5.1(5B130a)
  • Titanium Studio,build:3.2.1.201402041146 sdk-version:3.2.2.GA
  • 构建:jenkins-titanium-rcp-master-95(origin / master)

0 个答案:

没有答案