forked from mirrors/linphone-iphone
LinphoneAppDelegate.m: terminate calls and unregister when terminating application if not using remote push
This commit is contained in:
parent
c0569585a7
commit
3e8dc2c20a
1 changed files with 10 additions and 0 deletions
|
|
@ -220,6 +220,16 @@
|
|||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
LOGI(@"%@", NSStringFromSelector(_cmd));
|
||||
|
||||
linphone_core_terminate_all_calls([LinphoneManager getLc]);
|
||||
|
||||
// destroyLinphoneCore automatically unregister proxies but if we are using
|
||||
// remote push notifications, we want to continue receiving them
|
||||
if ([LinphoneManager instance].pushNotificationToken != nil) {
|
||||
//trick me! setting network reachable to false will avoid sending unregister
|
||||
linphone_core_set_network_reachable([LinphoneManager getLc], FALSE);
|
||||
}
|
||||
[[LinphoneManager instance] destroyLinphoneCore];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue