我看到Crashlytics发生了一次神秘的撞击,我无法确定原因。任何可能的指导将不胜感激。
在viewWillAppear方法的HomeViewController类中,我调用了以下方法:
<div id="hero-container">
<p id="text">
First text here
</p>
<p id="text2">
Secondary
</p>
</div>
Crashlytics报告说,对于少数用户来说,它在上述方法中的addChildViewController()行崩溃,并且对于这一小部分用户来说,它会多次崩溃。我无法重现。以下是Crashlytics的日志:
func showSplash() {
view.bringSubview(toFront: splashView)
self.navigationController?.isNavigationBarHidden = true
UIApplication.shared.setStatusBarHidden(true, with: UIStatusBarAnimation.none)
splashVC = self.storyboard!.instantiateViewController(withIdentifier: "SplashViewController") as? SplashViewController
if splashVC != nil && splashView != nil {
splashVC!.delegate = self
splashVC!.view.frame = splashView.bounds
addChildViewController(splashVC!) // CRASHING ON THIS LINE
splashView.addSubview(splashVC!.view)
splashVC!.didMove(toParentViewController: self)
}
}