-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
// maybe refactor to this suggestion by o1 later:
public func processCrashReport() {
let crashReportPath = FileManager.getDocumentsDirectory().appendingPathComponent("last_crash.json")
do {
let crashData = try Data(contentsOf: crashReportPath)
if let crashDetails = try JSONSerialization.jsonObject(with: crashData, options: []) as? [String: String] {
// Send the crash details to your endpoint
sendCrashReportToServer?(crashDetails)
// Delete the crash report after sending it
try FileManager.default.removeItem(at: crashReportPath)
}
} catch {
print("Error processing crash report: \(error)")
}
}Metadata
Metadata
Assignees
Labels
No labels