-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get crash report when it crash #525
Comments
Hi! |
I found the unreported crash during cold start and converted it to a String. Because report.stringValue was nil when I directly took it, I converted it through a filter. Is this the correct procedure? |
I can use .unsymbolicated to get unsymbolicated stringValue, but How to set it if you don't want to automatically symbolize when capturing crash? |
The For example, you could do something like this: if let report = KSCrash.shared().report(for: reportId),
let value = report.dictionaryValue,
let jsonData = try? JSONSerialization.data(withJSONObject: value, options: []),
let jsonString = String(data: jsonData, encoding: .utf8) {
print(jsonString)
// Send jsonString to your server
} This approach should give you the raw crash report data in a string format that you can easily send to your server.
If you need raw addresses, you can get them from |
It's worth noting that you're using an alpha version of KSCrash. This version is not stable, and the API may change. For production, it's recommended to use the latest stable 1.x version (currently 1.17.4):
However, be aware that the API in 1.x versions differs slightly from the 2.0.0-alpha version. If you switch, you'll need to adjust your code for the version you're using. |
I want to get the crash report when it crashes or cold starts, and upload it manually to our server. How can I do it?
The KSCrash version I use is
pod 'KSCrash', '~> 2.0.0-alpha.4'
The text was updated successfully, but these errors were encountered: