首页 > 解决方案 > 在 Xcode 10.0 上运行 react-native 应用程序时收到错误消息

问题描述

我是 IOS 应用程序开发的新手,我正在尝试在 MAC(虚拟机)上运行 react 本机应用程序,但在启动屏幕后卡住了。

在这行代码中出现错误。 在此处输入图像描述

在报告导航器上显示以下消息。

2018-09-26 05:03:23.637243+0530 排行榜[56620:700325] - [I-ACS036002] 分析屏幕报告已启用。调用 +[FIRAnalytics setScreenName:setScreenClass:] 设置屏幕名称或覆盖默认屏幕类名称。要禁用屏幕报告,请在 Info.plist 2018-09-26 05:03:24.334073+0530 Leaderboard[56620:699937] +[CATransaction synchronize] 中将标志 FirebaseScreenReportingEnabled 设置为 NO(布尔值)在事务 2018-09-26 中调用05:03:25.352 [info][tid:main][RCTCxxBridge.mm:216] 正在初始化(父:,执行程序:(null)) 2018-09-26 05:03:25.385767+0530 排行榜[56620:699937] 正在初始化(parent: , executor: (null)) 2018-09-26 05:03:25.749 [info][tid:main][RCTRootView.m:293] 运行应用排行榜 ({ initialProps = { }; rootTag = 1; } ) 2018-09-26 05:03:25.831679+0530 排行榜[56620:* 由于未捕获的异常“com.firebase.core”而终止应用程序,原因:“ [FIRApp configure];FirebaseApp.configure()在 Swift 中)在您的项目中找不到有效的 GoogleService-Info.plist。请从https://console.firebase.google.com/下载一个。' *第一次抛出调用堆栈:( 0 CoreFoundation 0x00000001052a91e6exceptionPreprocess + 294 1 libobjc.A.dylib 0x000000010371e031 objc_exception_throw + 48 2 CoreFoundation 0x000000010531e975 +[NSException raise:format:] + 197 3 Leaderboard 0x0000000101e80451 +[FIRApp configure] + 481 4 Leaderboard 0x0000000101e7fb07 -[AppDelegate application:didFinishLaunchingWithOptions:] + 871 5 UIKit 0x0000000107ee96fb -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278 6 UIKit 0x0000000107eeb172 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4123 7 UIKit 0x00000000107ef05comtransactionb] + 1677 8 UIKit 0x00000001082b2f7e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866 9 UIKit 0x0000000108685a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 10 UIKit 0x00000001082b2bba -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236 11 UIKit 0x00000001082b33db -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675 12 UIKit 0x0000000108c24614 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299 13 UIKit 0x0000000108c244ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433 14 UIKit 0x000000010890875d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221 15 UIKit 0x0000000108b034b7 _performActionsWithDelayForTransitionContext + 100 16 UIKit 0x0000000108908627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223 17 UIKit 0x00000001086850e0 -[_UICanvas 场景:didUpdateWithDiff:transitionContext:completion:] + 392 18 UIKit 0x0000000107eeeeac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 19 UIKit 0x00000001084c1bcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361 20 FrontBoardServices 0x000000010e05a2f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331 21 FrontBoardServices 0x000000010e062cfa __56-[FBSWorkspace 客户端:handleCreateScene:withCompletion:]_block_invoke_2 + 225 22 libdispatch.dylib 0x000000010695a7ec _dispatch_client_callout + 8 23 libdispatch。dylib 0x000000010695fdb8 _dispatch_block_invoke_direct + 592 24 FrontBoardServices 0x000000010e08e470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK+ 24 25 FrontBoardServices 0x000000010e08e12e -[FBSSerialQueue _performNext] + 439 26 FrontBoardServices 0x000000010e08e68e -[FBSSerialQueue _performNextFromRunLoopSource] + 45 27 CoreFoundation 0x000000010524bbb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION+ 17 28 CoreFoundation 0x00000001052304af __CFRunLoopDoSources0 + 271 29 CoreFoundation 0x000000010522fa6f __CFRunLoopRun + 1263 30 CoreFoundation 0x000000010522f30b CFRunLoopRunSpecific + 635 31 GraphicsServices 0x000000010d42ea73 GSEventRunModal + 62 32 UIKit 0x0000000107ef2057 UIApplicationMain + 159 33 Leaderboard 0x0000000101e7fc90 main + 112 34 libdyld.dylib 0x000000010a98c955 start + 1 35 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: 以 NSException (lldb) 类型的未捕获异常终止

标签: react-nativereact-native-iosxcode10

解决方案


如果你想在你的项目中使用 Firebase,你应该从 Firebase 控制台创建一个应用并配置它。然后你应该下载GoogleService-Info.plist并复制到你的项目中。您可以在错误日志中清楚地看到这一点。

请遵循本教程:https ://firebase.google.com/docs/ios/setup


推荐阅读