【问题标题】:Getting error message when run react-native application on Xcode 10.0在 Xcode 10.0 上运行 react-native 应用程序时收到错误消息
【发布时间】:2019-03-02 04:11:29
【问题描述】:

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

在这行代码处出错。

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

2018-09-26 05:03:23.637243+0530 排行榜[56620:700325] - [I-ACS036002] 分析屏幕报告已启用。调用 +[FIRAnalytics setScreenName:setScreenClass:] 设置屏幕名称或覆盖默认屏幕类名称。要禁用屏幕报告,请在 Info.plist 中将标志 FirebaseScreenReportingEnabled 设置为 NO(布尔值) 2018-09-26 05:03:24.334073+0530 排行榜[56620:699937] +[CATransaction 同步] 在事务中调用 2018-09-26 05:03:25.352 [info][tid:main][RCTCxxBridge.mm:216] 初始化(父:,执行者:(空)) 2018-09-26 05:03:25.385767+0530 排行榜[56620:699937] 正在初始化(父:,执行:(空)) 2018-09-26 05:03:25.749 [info][tid:main][RCTRootView.m:293] 运行应用程序排行榜({ 初始属性 = { }; 根标签 = 1; }) 2018-09-26 05:03:25.831679+0530 排行榜[56620:699937] 运行应用排行榜({ 初始属性 = { }; 根标签 = 1; }) 2018-09-26 05:03:26.353502+0530 排行榜[56620:699937] * 由于未捕获的异常“com.firebase.core”而终止应用程序,原因:“[FIRApp configure];(Swift 中的FirebaseApp.configure())可以在您的项目中找不到有效的 GoogleService-Info.plist。请从https://console.firebase.google.com/下载一个。 * 首先抛出调用栈: ( 0 CoreFoundation 0x00000001052a91e6 异常预处理 + 294 1 libobjc.A.dylib 0x000000010371e031 objc_exception_throw + 48 2 核心基础 0x000000010531e975 +[NSException raise:format:] + 197 3 排行榜 0x0000000101e80451 +[FIRApp 配置] + 481 4 排行榜 0x0000000101e7fb07 -[AppDelegate 应用程序:didFinishLaunchingWithOptions:] + 871 5 UIKit 0x0000000107ee96fb-[UIApplication_handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278 6 UIKit 0x0000000107eeb172-[UIApplication_callInitializationDelegatesForMainScene:transitionContext:] + 4123 7 UIKit 0x0000000107ef05cb-[UIApplication_runWithMainScene:transitionContext:completion:] + 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 工作区:didCreateScene:withTransitionContext:completion:] + 515 19 UIKit 0x00000001084c1bcb-[UIApplicationSceneClientAgent 场景:didInitializeWithEvent:完成:] + 361 20 前板服务 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 前板服务 0x000000010e08e470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24 25 前板服务 0x000000010e08e12e -[FBSSerialQueue _performNext] + 439 26 前板服务 0x000000010e08e68e -[FBSSerialQueue _performNextFromRunLoopSource] + 45 27 核心基础 0x000000010524bbb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 28 核心基础 0x00000001052304af __CFRunLoopDoSources0 + 271 29 核心基础 0x000000010522fa6f __CFRunLoopRun + 1263 30 核心基础 0x000000010522f30b CFRunLoopRunSpecific + 635 31 图形服务 0x000000010d42ea73 GSEventRunModal + 62 32 UIKit 0x0000000107ef2057 UIApplicationMain + 159 33 排行榜 0x0000000101e7fc90 主要 + 112 34 libdyld.dylib 0x000000010a98c955 开始 + 1 35 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止 (lldb)

【问题讨论】:

    标签: react-native react-native-ios xcode10


    【解决方案1】:

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

    请按照本教程进行操作:https://firebase.google.com/docs/ios/setup

    【讨论】:

    • 我会检查一下,实际上同一个项目在 Xcode 9.4 上工作,升级到 Xcode 10.0 后停止工作
    • 这与 GoogleService-Info.plist 有关,实际上该文件已经存在但无法在 Xcode 10 上运行,我在 Xcode 上创建了新文件(GoogleService-Info.plist)并更新了内容。感谢您的帮助!
    猜你喜欢
    • 2015-01-29
    • 2011-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-11
    • 1970-01-01
    • 2020-03-26
    • 2021-11-11
    相关资源
    最近更新 更多