在从本机应用程序创建本机响应桥时,该应用程序崩溃。代码的堆栈跟踪如下:
facebook::react::Instance::loadApplication(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) (Instance.cpp:61)
facebook::react::Instance::loadScriptFromString(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) (Instance.cpp:95)
__51-[RCTCxxBridge executeApplicationScript:url:async:]_block_invoke (RCTCxxBridge.mm:1301)
facebook::react::tryAndReturnError(std::__1::function<void ()> const&) (RCTCxxUtils.mm:72)
[RCTCxxBridge _tryAndHandleError:] (RCTCxxBridge.mm:257)
[RCTCxxBridge executeApplicationScript:url:async:] (RCTCxxBridge.mm:1284)
[RCTCxxBridge enqueueApplicationScript:url:onComplete:] (RCTCxxBridge.mm:1264)
[RCTCxxBridge executeSourceCode:sync:] (RCTCxxBridge.mm:891)
[RCTCxxBridge start]_block_invoke_2 (RCTCxxBridge.mm:371)
完整代码可在此处找到。 https://github.com/facebook/react-native/blob/master/React/CxxBridge/RCTCxxBridge.mm