diff --git a/Classes/BITCrashManagerPrivate.h b/Classes/BITCrashManagerPrivate.h index c1b6362189..5bb40500e2 100644 --- a/Classes/BITCrashManagerPrivate.h +++ b/Classes/BITCrashManagerPrivate.h @@ -103,6 +103,8 @@ - (void)setLastCrashFilename:(NSString *)lastCrashFilename; +- (void)leavingAppSafely; + @end diff --git a/Classes/BITUpdateManager.m b/Classes/BITUpdateManager.m index 4e9a5ce1ba..ab3e35fdf9 100644 --- a/Classes/BITUpdateManager.m +++ b/Classes/BITUpdateManager.m @@ -42,6 +42,10 @@ #import "BITUpdateViewControllerPrivate.h" #import "BITAppVersionMetaInfo.h" +#if HOCKEYSDK_FEATURE_CRASH_REPORTER +#import "BITCrashManagerPrivate.h" +#endif + typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) { BITUpdateAlertViewTagDefaultUpdate = 0, BITUpdateAlertViewTagNeverEndingAlertView = 1, @@ -138,6 +142,10 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) { [self.delegate updateManagerWillExitApp:self]; } +#if HOCKEYSDK_FEATURE_CRASH_REPORTER + [[BITHockeyManager sharedHockeyManager].crashManager leavingAppSafely]; +#endif + // for now we simply exit the app, later SDK versions might optionally show an alert with localized text // describing the user to press the home button to start the update process exit(0);