aboutsummaryrefslogtreecommitdiff
path: root/src/client/ios
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ios')
-rw-r--r--src/client/ios/BreakpadController.h3
-rw-r--r--src/client/ios/BreakpadController.mm7
2 files changed, 10 insertions, 0 deletions
diff --git a/src/client/ios/BreakpadController.h b/src/client/ios/BreakpadController.h
index f766100e..6e6229a7 100644
--- a/src/client/ios/BreakpadController.h
+++ b/src/client/ios/BreakpadController.h
@@ -105,6 +105,9 @@
// BreakpadController.
- (void)setUploadingEnabled:(BOOL)enabled;
+// Check if there is currently a crash report to upload.
+- (void)hasReportToUpload:(void(^)(BOOL))callback;
+
@end
#endif // CLIENT_IOS_HANDLER_IOS_BREAKPAD_CONTROLLER_H_
diff --git a/src/client/ios/BreakpadController.mm b/src/client/ios/BreakpadController.mm
index 01312c8f..31affa18 100644
--- a/src/client/ios/BreakpadController.mm
+++ b/src/client/ios/BreakpadController.mm
@@ -228,6 +228,13 @@ NSString* GetPlatform() {
});
}
+- (void)hasReportToUpload:(void(^)(BOOL))callback {
+ NSAssert(started_, @"The controller must be started before "
+ "hasReportToUpload is called");
+ dispatch_async(queue_, ^{
+ callback(breakpadRef_ && BreakpadHasCrashReportToUpload(breakpadRef_));
+ });
+}
#pragma mark -