- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在现有项目中面临一个奇怪的问题。
从早上开始,我就面临着来自火力基地的一次奇怪的崩溃。
它工作正常,没有任何问题,但从早上开始我就面临这个问题。
崩溃:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The default FIRApp instance must be configured before the default FIRAuthinstance can be initialized. One way to ensure that is to call
[FIRApp configure];
(FirebaseApp.configure()
in Swift) in the App Delegate'sapplication:didFinishLaunchingWithOptions:
(application(_:didFinishLaunchingWithOptions:)
in Swift).'
FirebaseApp.configure()
在我的应用程序委托(delegate)中,它自过去 6 个月以来就已经存在。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Messaging.messaging().delegate = self as? MessagingDelegate
self.getRegisterForRemoteNotifications(application)
return true
}
didFinishLaunchingWithOptions
中已经调用了 Firebase 配置应用启动时仍面临崩溃问题。
didFinishLaunchingWithOptions
方法不调用并且它使我的应用程序崩溃。
var authUI: FUIAuth!
override func viewDidLoad() {
super.viewDidLoad()
authUI = FUIAuth.defaultAuthUI()
authUI?.delegate = self
if authUI.auth?.currentUser != nil {
self.checkAdminUser()
self.getFavPlace()
}
}
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The default FIRApp instance must be configured before the default FIRAuthinstance can be initialized. One way to ensure that is to call
[FIRApp configure];
(FirebaseApp.configure()
in Swift) in the App Delegate'sapplication:didFinishLaunchingWithOptions:
(application(_:didFinishLaunchingWithOptions:)
in Swift).' * First throw call stack: ( 0 CoreFoundation 0x00007fff23c7127e exceptionPreprocess + 350 1 libobjc.A.dylib
0x00007fff513fbb20 objc_exception_throw + 48 2 CoreFoundation
0x00007fff23c710bc +[NSException raise:format:] + 188 3 Herrd
0x000000010559e826 +[FIRAuth auth] + 118 4 Herrd
0x00000001054fe84d $s5Herrd23TopicNewsViewControllerC5coderACSgSo7NSCoderC_tcfc + 605 5 Herrd 0x00000001054feaa3 $s5Herrd23TopicNewsViewControllerC5coderACSgSo7NSCoderC_tcfcTo + 51 6 UIKitCore 0x00007fff47cf7268 -[UIClassSwapper initWithCoder:] + 2427 7 UIFoundation 0x00007fff4753d872 UINibDecoderDecodeObjectForValue + 744 8
UIFoundation 0x00007fff4753db19 UINibDecoderDecodeObjectForValue + 1423 9 UIFoundation
0x00007fff4753d57d -[UINibDecoder decodeObjectForKey:] + 251 10 UIKitCore 0x00007fff47cf6531 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsAndTrackChildViewControllerIndexWithParent:forKey:] + 298 11 UIKitCore 0x00007fff47a0e65d -[UIViewController initWithCoder:] + 1419 12 UIKitCore 0x00007fff4795cc16 -[UINavigationController initWithCoder:] + 65 13 UIFoundation 0x00007fff4753d872 UINibDecoderDecodeObjectForValue + 744 14 UIFoundation
0x00007fff4753db19 UINibDecoderDecodeObjectForValue + 1423 15 UIFoundation 0x00007fff4753d57d -[UINibDecoder decodeObjectForKey:] + 251 16 UIKitCore
0x00007fff47cf6531 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsAndTrackChildViewControllerIndexWithParent:forKey:] + 298 17 UIKitCore 0x00007fff47a0e65d -[UIViewController initWithCoder:] + 1419 18 UIKitCore 0x00007fff4793fbed -[UITabBarController initWithCoder:] + 65 19 UIKitCore 0x00007fff47cf7268 -[UIClassSwapper initWithCoder:] + 2427 20 UIFoundation 0x00007fff4753d872 UINibDecoderDecodeObjectForValue + 744 21 UIFoundation 0x00007fff4753d57d -[UINibDecoder decodeObjectForKey:] + 251 22 UIKitCore
0x00007fff47cfb56f -[UIRuntimeConnection initWithCoder:] + 125 23 UIFoundation 0x00007fff4753d872 UINibDecoderDecodeObjectForValue + 744 24 UIFoundation
0x00007fff4753db19 UINibDecoderDecodeObjectForValue + 1423 25 UIFoundation 0x00007fff4753d57d -[UINibDecoder decodeObjectForKey:] + 251 26 UIKitCore
0x00007fff47cf6336 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 450 27 UIKitCore 0x00007fff47cf90a5 -[UINib instantiateWithOwner:options:] + 1145 28 UIKitCore
0x00007fff481f8f24 -[UIStoryboard __reallyInstantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 279 29 UIKitCore 0x00007fff481f8dcf -[UIStoryboard _instantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 97 30 UIKitCore 0x00007fff48091ebf -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 167 31 UIKitCore 0x00007fff48092473 -[UIApplication _loadMainInterfaceFile] + 274 32 UIKitCore 0x00007fff48090dff -[UIApplication _runWithMainScene:transitionContext:completion:] + 964 33 UIKitCore 0x00007fff477c576d -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122 34 UIKitCore 0x00007fff47cb44c1 _UIScenePerformActionsWithLifecycleActionMask + 83 35 UIKitCore 0x00007fff477c627f __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198 36 UIKitCore 0x00007fff477c5c8e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296 37 UIKitCore 0x00007fff477c60ac -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818 38 UIKitCore 0x00007fff477c5941 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345 39 UIKitCore 0x00007fff477c9f3f __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178 40 UIKitCore 0x00007fff47bd8c83 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865 41 UIKitCore
0x00007fff47cd2dff _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240 42 UIKitCore 0x00007fff477c9c5a __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153 43 UIKitCore 0x00007fff47cd2d02 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84 44 UIKitCore 0x00007fff477c9ac8 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381 45 UIKitCore 0x00007fff476206e7 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657 46 UIKitCore 0x00007fff4761f26c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248 47 UIKitCore 0x00007fff47620411 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210 48 UIKitCore 0x00007fff4808f599 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535 49 UIKitCore 0x00007fff47bfa7f5 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361 50 FrontBoardServices 0x00007fff365d6165 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442 51 FrontBoardServices 0x00007fff365fc4d8 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102 52 FrontBoardServices 0x00007fff365e0c45 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220 53 FrontBoardServices 0x00007fff365fc169 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355 54 libdispatch.dylib 0x000000010a31dd48 _dispatch_client_callout + 8 55 libdispatch.dylib 0x000000010a320cb9 _dispatch_block_invoke_direct + 300 56 FrontBoardServices 0x00007fff3662237e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30 57 FrontBoardServices 0x00007fff3662206c -[FBSSerialQueue _queue_performNextIfPossible] + 441 58 FrontBoardServices 0x00007fff3662257b -[FBSSerialQueue _performNextFromRunLoopSource] + 22 59 CoreFoundation 0x00007fff23bd4471 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 60 CoreFoundation 0x00007fff23bd439c __CFRunLoopDoSource0 + 76 61 CoreFoundation 0x00007fff23bd3b74 __CFRunLoopDoSources0 + 180 62 CoreFoundation
0x00007fff23bce87f __CFRunLoopRun + 1263 63 CoreFoundation
0x00007fff23bce066 CFRunLoopRunSpecific + 438 64 GraphicsServices
0x00007fff384c0bb0 GSEventRunModal + 65 65 UIKitCore
0x00007fff48092d4d UIApplicationMain + 1621 66 Herrd
0x000000010552eb0b main + 75 67 libdyld.dylib
0x00007fff5227ec25 start + 1 68 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException
最佳答案
最后,我找到了为什么我的应用程序崩溃而不调用 appDidFinshLaunching()
.
它是由于 TabViewController
之一尝试在 FirebaseApp.configure()
之前获取当前用户详细信息从应用委托(delegate)调用。
其直接定义如下。
let user = FIRAuth().auth.currentUser
viewDidLoad()
下方法,现在该应用程序运行良好,没有任何崩溃。
关于ios - 应用程序在加载时崩溃并且根本没有调用 `didFinishLaunchingWithOptions`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60212857/
我正在通过 labrepl 工作,我看到了一些遵循此模式的代码: ;; Pattern (apply #(apply f %&) coll) ;; Concrete example user=> (a
我从未向应用商店提交过应用,但我会在不久的将来提交。 到目前为止,我对为 iPhone 而非 iPad 进行设计感到很自在。 我了解,通过将通用PAID 应用放到应用商店,客户只需支付一次就可以同时使
我有一个应用程序,它使用不同的 Facebook 应用程序(2 个不同的 AppID)在 Facebook 上发布并显示它是“通过 iPhone”/“通过 iPad”。 当 Facebook 应用程序
我有一个要求,我们必须通过将网站源文件保存在本地 iOS 应用程序中来在 iOS 应用程序 Webview 中运行网站。 Angular 需要服务器来运行应用程序,但由于我们将文件保存在本地,我们无法
所以我有一个单页客户端应用程序。 正常流程: 应用程序 -> OAuth2 服务器 -> 应用程序 我们有自己的 OAuth2 服务器,因此人们可以登录应用程序并获取与用户实体关联的 access_t
假设我有一个安装在用户设备上的 Android 应用程序 A,我的应用程序有一个 AppWidget,我们可以让其他 Android 开发人员在其中以每次安装成本为基础发布他们的应用程序推广广告。因此
Secrets of the JavaScript Ninja中有一个例子它提供了以下代码来绕过 JavaScript 的 Math.min() 函数,该函数需要一个可变长度列表。 Example:
当我分别将数组和对象传递给 function.apply() 时,我得到 NaN 的 o/p,但是当我传递对象和数组时,我得到一个数字。为什么会发生这种情况? 由于数组也被视为对象,为什么我无法使用它
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界. 这篇CFSDN的博客文章ASP转换格林威治时间函数DateDiff()应用由作者收集整理,如果你
我正在将列表传递给 map并且想要返回一个带有合并名称的 data.frame 对象。 例如: library(tidyverse) library(broom) mtcars %>% spl
我有一个非常基本的问题,但我不知道如何实现它:我有一个返回数据框,其中每个工具的返回值是按行排列的: tmp<-as.data.frame(t(data.frame(a=rnorm(250,0,1)
我正在使用我的 FB 应用创建群组并邀请用户加入我的应用群组,第一次一切正常。当我尝试创建另一个组时,出现以下错误: {"(OAuthException - #4009) (#4009) 在有更多用户
我们正在开发一款类似于“会说话的本”应用程序的 child 应用程序。它包含大量用于交互式动画的 JPEG 图像序列。 问题是动画在 iPad Air 上播放正常,但在 iPad 2 上播放缓慢或滞后
我关注 clojure 一段时间了,它的一些功能非常令人兴奋(持久数据结构、函数式方法、不可变状态)。然而,由于我仍在学习,我想了解如何在实际场景中应用,证明其好处,然后演化并应用于更复杂的问题。即,
我开发了一个仅使用挪威语的应用程序。该应用程序不使用本地化,因为它应该仅以一种语言(挪威语)显示。但是,我已在 Info.plist 文件中将“本地化 native 开发区域”设置为“no”。我还使用
读完 Anthony's response 后上a style-related parser question ,我试图说服自己编写单体解析器仍然可以相当紧凑。 所以而不是 reference ::
multicore 库中是否有类似 sapply 的东西?还是我必须 unlist(mclapply(..)) 才能实现这一点? 如果它不存在:推理是什么? 提前致谢,如果这是一个愚蠢的问题,我们深表
我喜欢在窗口中弹出结果,以便更容易查看和查找(例如,它们不会随着控制台继续滚动而丢失)。一种方法是使用 sink() 和 file.show()。例如: y <- rnorm(100); x <- r
我有一个如下所示的 spring mvc Controller @RequestMapping(value="/new", method=RequestMethod.POST) public Stri
我正在阅读 StructureMap关于依赖注入(inject),首先有两部分初始化映射,具体类类型的接口(interface),另一部分只是实例化(请求实例)。 第一部分需要配置和设置,这是在 Bo
我是一名优秀的程序员,十分优秀!