Post

Replies

Boosts

Views

Activity

Reply to <compiler-generated> Error shows fatal crash in firebase crashlytics...but the app does not crash for the user
Thank you so much for your replies. I really do appreciate it. I will work on symblocating. This particular crash is from my phone. And the app is working from my perspective looking at the device as it should. The app never shut down that I could see. I was able to do everything even after the crash. I'm not trying to be argumentative and I apologize if I appear to be. But that's what I see. I think the alert that pops up when the app is opened for the very first time after downloading the app. Thank you again for all of your help
Jul ’24
Reply to <compiler-generated> Error shows fatal crash in firebase crashlytics...but the app does not crash for the user
Here is a symbolicated file DigiDeals-2024-07-23-150203_symbolicated.txt this is the code in AppDelegate didFinishLaunchingWithOptions that calls displayMessages which is where the app seems to crash Task{ await universal.displayMessages() } this is the displayMessages() code with the line it seems to crash at in bold. Again, the alert shows and when OK is selected (only when app is first opened after download otherwise the app just goes to the home screen when OK is selected) the popUpZipCode() (underlined below) runs. The app seems to crash only when the app first runs after download. func displayMessages() async{ var inf: Information = Information(Message: " ", MsgType: " ") var buttonText: String = "OK" //if (!msgDisp && allowNotifications){ if (!msgDisp){ do { let querySnapshot = try await db.collection("AppInfo").getDocuments() for document in querySnapshot.documents { //print("\(document.documentID) => \(document.data())") ///// your code if (document["MsgType"] as! String == "I"){ inf.Message = document["Message"] as! String inf.MsgType = document["MsgType"] as! String information.append(inf) } else if (document["MsgType"] as! String == "B"){ buttonText = document["Message"] as! String } else if (document["MsgType"] as! String == "Z"){ zipMsg = document["Message"] as! String } else if (document["MsgType"] as! String == "V"){ curVers = document["Message"] as! String let appVersion = Bundle.main.releaseVersionNumber if (curVers != appVersion){ needUpdate = true inf.Message = "DigiD has a more current version. Select Update App below to update Digid" inf.MsgType = "I" information.append(inf) } else { needUpdate = false } } } // show if allowNotifications OR needUpdate if (information.count > 0 && (allowNotifications || needUpdate)) { var msg: String = " " for m in information{ msg = msg + "\(m.Message)\n\n" } let topController = topMostController() let alert = UIAlertController(title: "DigiDeals Info", message: msg, preferredStyle: .alert) //initialRun = true //for testing alert.addAction(UIAlertAction(title: buttonText, style: .cancel, handler: { (action: UIAlertAction!) in if (initialRun){ initialRun = false __universal.popUpZipCode()__ } //universal.showZipAlert(topController: topController!) })) if (needUpdate){ alert.addAction(UIAlertAction(title: "Update App", style: .default, handler: { (action: UIAlertAction!) in if let url = URL(string: "itms-apps://apps.apple.com/us/app/digidealsus/id6499593438") { UIApplication.shared.open(url) } //universal.showZipAlert(topController: topController!) })) } ** topController!.present(alert, animated: true)** } } catch { print("Error getting documents: \(error)") } }
Jul ’24
Reply to <compiler-generated> Error shows fatal crash in firebase crashlytics...but the app does not crash for the user
Thank you again for all of your help. I am checking for nil on the topController so I hope this will fix the issue. I still find it odd that the app did not crash on the devices...at least the app didn't shut down as in a normal crash. But hopefully this will get the crashes to stop showing up in crashlytics. I learned a lot from you on this thread so thanks a ton!
Jul ’24