mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user