ios: try to leave the meeting when the app is terminating
Fixes: https://github.com/jitsi/jitsi-meet/issues/6665
This commit is contained in:
parent
07f64d94c0
commit
b7f1f3c659
|
@ -18,6 +18,7 @@
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
#import "FIRUtilities.h"
|
#import "FIRUtilities.h"
|
||||||
#import "Types.h"
|
#import "Types.h"
|
||||||
|
#import "ViewController.h"
|
||||||
|
|
||||||
@import Crashlytics;
|
@import Crashlytics;
|
||||||
@import Fabric;
|
@import Fabric;
|
||||||
|
@ -57,6 +58,13 @@
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) applicationWillTerminate:(UIApplication *)application {
|
||||||
|
NSLog(@"Application will terminate!");
|
||||||
|
// Try to leave the current meeting graceefully.
|
||||||
|
ViewController *rootController = (ViewController *)self.window.rootViewController;
|
||||||
|
[rootController terminate];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark Linking delegate methods
|
#pragma mark Linking delegate methods
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application
|
- (BOOL)application:(UIApplication *)application
|
||||||
|
|
|
@ -20,4 +20,6 @@
|
||||||
|
|
||||||
@interface ViewController : UIViewController<JitsiMeetViewDelegate>
|
@interface ViewController : UIViewController<JitsiMeetViewDelegate>
|
||||||
|
|
||||||
|
- (void)terminate;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -102,4 +102,11 @@
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#pragma mark - Helpers
|
||||||
|
|
||||||
|
- (void)terminate {
|
||||||
|
JitsiMeetView *view = (JitsiMeetView *) self.view;
|
||||||
|
[view leave];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue