未找到Firebase根视图控制器警告 [英] Firebase Root View Controller Not Found Warning
问题描述
< Warning> [Firebase / Analytics] [I-ACS031011]找不到根视图控制器
基本上删除帖子,然后向用户显示帖子被删除的状态栏通知。这是当我们想要删除一个职位时调用的方法。
pre $ HomeViewNetwork.deletePost(postBlock:self.postDataBlock,handler :{
AlertManager.showStatusRed(title:Post deleted!)
})
class func showStatusRed(title:String){
let statusMessage = MessageView.viewFromNib(layout:.StatusLine)
var config = SwiftMessages.defaultConfig
config.presentationContext = .window(windowLevel:UIWindowLevelStatusBar)
statusMessage.configureContent(body:title)
statusMessage.backgroundView.backgroundColor = UIColor(red:0.98,green:0.11,blue:0.35,alpha:1.00)
setUpStatusView(messageView:statusMessage)
statusSwiftMessages.show(config:config,view:statusMessage)
}
如果我评论AlertManager.showStatusRed方法,警告消失。此外,我正在使用SwiftMessages作为我的库来显示状态栏通知。
我不确定为什么当Xcode不提供任何有关根视图控制器的问题时,为什么Firebase会给我这个警告。任何帮助表示赞赏。
使用FirebaseCore 4.0.4(podfile.lock)的Objective-C only项目符合Xcode 9 GM的相关问题:
更新Firebase和其他相关信息依赖到最新版本解决了我的项目上的问题。
- Firebase / Core(4.2.0):
- FirebaseAnalytics(= 4.0.3)
- FirebaseCore(= 4.0.7)
其他线程回答: https://stackoverflow.com/a/46333312/342794
I got a strange warning from Firebase Analytics today. It is:
<Warning> [Firebase/Analytics][I-ACS031011] Root view controller not found
The methods I am using is basically deleting a post and then displaying a status bar notification to the user that the post is deleted. This is the method that is called when we want to delete a post.
HomeViewNetwork.deletePost(postBlock: self.postDataBlock, handler: {
AlertManager.showStatusRed(title: "Post deleted!")
})
And my displaying status function is:
class func showStatusRed(title: String) {
let statusMessage = MessageView.viewFromNib(layout: .StatusLine)
var config = SwiftMessages.defaultConfig
config.presentationContext = .window(windowLevel: UIWindowLevelStatusBar)
statusMessage.configureContent(body: title)
statusMessage.backgroundView.backgroundColor = UIColor(red:0.98, green:0.11, blue:0.35, alpha:1.00)
setUpStatusView(messageView: statusMessage)
statusSwiftMessages.show(config: config, view: statusMessage)
}
The warning goes away if I comment the AlertManager.showStatusRed method. Also I am using SwiftMessages as my library for displaying the status bar notification.
I am not sure why Firebase is giving me this warning when Xcode is not giving any issues about root view controller. Any help is appreciated.
Related question for objective-C only project complied with Xcode 9 GM using FirebaseCore 4.0.4 (podfile.lock): Xcode 9 <Warning> [Firebase/Analytics][I-ACS031011] Root view controller not found
Updating the firebase and other related dependencies to latest version fixed the issue on my project.
- Firebase/Core (4.2.0):
- FirebaseAnalytics (= 4.0.3)
- FirebaseCore (= 4.0.7)
Answer on other thread: https://stackoverflow.com/a/46333312/342794
这篇关于未找到Firebase根视图控制器警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!