Added new delegate for update process before exit

New delegate `updateManagerWillExitApp` for `BITUpdateManager` that is invoked right before the app wil exit to allow app update to start (>= iOS 8 only)
This commit is contained in:
Andreas Linde
2014-10-24 01:23:34 +02:00
parent a93df35d7d
commit 3356b1df1f
2 changed files with 19 additions and 0 deletions

View File

@@ -113,6 +113,10 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) {
// we only care about iOS 8 or later
if (bit_isPreiOS8Environment()) return;
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(updateManagerWillExitApp:)]) {
[self.delegate updateManagerWillExitApp:self];
}
// 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);