我确实进行了expo弹出,并在IOS中安装了Pod,当我通过Xcode构建应用程序时,它表示构建成功,但是,当IOS模拟器打开时,我仅看到白屏和Xcode中的错误
" **libc++abi.dylib: terminating with uncaught exception of type NSException**"
,它在官方文档中还说:“一旦运行,iOS应用程序应自动从Expo CLI服务的项目中请求JS捆绑包。”但是什么也没发生!
如何解决此问题?
这是一堆完整的错误:
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x0000000110efa23e libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x0000000110f4dc1c libsystem_pthread.dylib`pthread_kill + 285
frame #2: 0x0000000110cbcc45 libsystem_c.dylib`abort + 127
frame #3: 0x0000000110a4a5b1 libc++abi.dylib`abort_message + 231
frame #4: 0x0000000110a4a74d libc++abi.dylib`default_terminate_handler() + 265
frame #5: 0x000000010e193a9d libobjc.A.dylib`_objc_terminate() + 97
frame #6: 0x0000000110a5665e libc++abi.dylib`std::__terminate(void (*)()) + 8
frame #7: 0x0000000110a566d3 libc++abi.dylib`std::terminate() + 51
frame #8: 0x000000010e193a22 libobjc.A.dylib`objc_terminate + 9
frame #9: 0x0000000110b61616 libdispatch.dylib`_dispatch_client_callout + 28
frame #10: 0x0000000110b64b78 libdispatch.dylib`_dispatch_block_invoke_direct + 301
frame #11: 0x0000000116965ba8 FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
frame #12: 0x0000000116965860 FrontBoardServices`-[FBSSerialQueue _performNext] + 457
frame #13: 0x0000000116965e40 FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 45
frame #14: 0x000000010f9e8721 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #15: 0x000000010f9e7f93 CoreFoundation`__CFRunLoopDoSources0 + 243
frame #16: 0x000000010f9e263f CoreFoundation`__CFRunLoopRun + 1263
frame #17: 0x000000010f9e1e11 CoreFoundation`CFRunLoopRunSpecific + 625
frame #18: 0x0000000111f4a1dd GraphicsServices`GSEventRunModal + 62
frame #19: 0x0000000118e1581d UIKitCore`UIApplicationMain + 140
* frame #20: 0x00000001054e9490 civic-champs`main(argc=1, argv=0x00007ffeea716ff8) at main.m:8
frame #21: 0x0000000110bd7575 libdyld.dylib`start + 1
frame #22: 0x0000000110bd7575 libdyld.dylib`start + 1
当我向应用程序添加异常断点时,我看到它在以下代码行中停止:
答案 0 :(得分:0)
这很难说,因为堆栈跟踪非常有限,但是听起来像this错误。
要解决此问题,请the comment降级cocoapods
:
gem uninstall cocoapods
# Don't forget to press "Y" to remove executables
gem install cocoapods -v 1.5.3
答案 1 :(得分:0)
我找到了解决方案,我认为问题是在执行expo start
之前我没有运行pod install
。我再次克隆了项目,并在pod install
之后做了expo start
,这个问题消失了。