-
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
Extract report store API #549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stateless implementation!
* | ||
* @param onCompletion Called when sending is complete (nil = ignore). | ||
*/ | ||
- (void)sendAllReportsWithCompletion:(nullable KSCrashReportFilterCompletion)onCompletion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In swift it looks like open func sendAllReports() async throws -> ([any KSCrashReport], Bool)
. Perhaps it would be useful to document the "return value" as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think it's a right way... Tried playing with the docs but wasn't happy with the results. We can iterate on this later, it's good that API itself looks fine. Maybe we can drop "isSuccess" and assume that "no error == success". This would make API more clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can drop "isSuccess" and assume that "no error == success". This would make API more clean.
Yeah, I like this approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do separately, it would bring way too many changes to this PR
There is a set of methods in KSCrash API that expect install or report store setup.
But we don't actually need any global state to work with crash reports. So this PR adds a separate reports store class that extracts all public API for reports reading.