From 031bb070bfaaf7fd857dc37eec18bb4cf069b866 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 10 Jan 2017 10:23:59 +0100 Subject: [PATCH] add Message.plist de XCode.proj + cancel timer better managed --- Classes/LinphoneAppDelegate.m | 12 +++++------- linphone.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 9bfdb0bd3..23d683bf0 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -110,15 +110,13 @@ } instance->currentCallContextBeforeGoingBackground.call = 0; } else if (linphone_call_get_state(call) == LinphoneCallIncomingReceived) { + LinphoneCallAppData *data = (__bridge LinphoneCallAppData *)linphone_call_get_user_data(call); + if (data && data->timer) { + [data->timer invalidate]; + data->timer = nil; + } if ((floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max)) { if ([LinphoneManager.instance lpConfigBoolForKey:@"autoanswer_notif_preference"]) { - if (call) { - LinphoneCallAppData *data = (__bridge LinphoneCallAppData *)linphone_call_get_user_data(call); - if (data->timer) { - [data->timer invalidate]; - data->timer = nil; - } - } linphone_core_accept_call(LC, call); [PhoneMainView.instance changeCurrentView:CallView.compositeViewDescription]; } else { diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 45902561e..f9603b307 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -672,6 +672,7 @@ 8C2595DD1DEDC92D007A6424 /* ProviderDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C2595DC1DEDC92D007A6424 /* ProviderDelegate.m */; }; 8C2595DF1DEDCC8E007A6424 /* CallKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C2595DE1DEDCC8E007A6424 /* CallKit.framework */; }; 8C2595E11DEDDC67007A6424 /* callkit_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C2595E01DEDDC67007A6424 /* callkit_logo.png */; }; + 8C493F9F1E23C27A009322AB /* message.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8C493F9E1E23C27A009322AB /* message.plist */; }; 8C73477C1D9BA3A00022EE8C /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C73477B1D9BA3A00022EE8C /* UserNotifications.framework */; }; 8CA2004C1D8158440095F859 /* PushKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CA2004B1D8158440095F859 /* PushKit.framework */; }; 9EC6C1E11DF96991006C2FD2 /* armv7-apple-darwin.ios in Frameworks */ = {isa = PBXBuildFile; fileRef = 9EC6C1E01DF96991006C2FD2 /* armv7-apple-darwin.ios */; }; @@ -1595,6 +1596,7 @@ 8C2595DC1DEDC92D007A6424 /* ProviderDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProviderDelegate.m; sourceTree = ""; }; 8C2595DE1DEDCC8E007A6424 /* CallKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CallKit.framework; path = System/Library/Frameworks/CallKit.framework; sourceTree = SDKROOT; }; 8C2595E01DEDDC67007A6424 /* callkit_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = callkit_logo.png; sourceTree = ""; }; + 8C493F9E1E23C27A009322AB /* message.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = message.plist; path = Settings/message.plist; sourceTree = ""; }; 8C5D1B991D9BC48100DC6539 /* UIShopTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIShopTableCell.h; sourceTree = ""; }; 8C5D1B9A1D9BC48100DC6539 /* UIShopTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIShopTableCell.m; sourceTree = ""; }; 8C5D1B9B1D9BC48100DC6539 /* UIShopTableCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UIShopTableCell.xib; sourceTree = ""; }; @@ -2218,6 +2220,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + 8C493F9E1E23C27A009322AB /* message.plist */, 8C23BCB71D82AAC3005F19BB /* linphone.entitlements */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97323FDCFA39411CA2CEA /* Frameworks */, @@ -3608,6 +3611,7 @@ 633FEEE91D3CD55A0014B822 /* numpad_9~ipad.png in Resources */, 633FEE331D3CD5590014B822 /* color_M.png in Resources */, 633FEE811D3CD5590014B822 /* led_connected@2x.png in Resources */, + 8C493F9F1E23C27A009322AB /* message.plist in Resources */, 633FEE881D3CD5590014B822 /* linphone_logo.png in Resources */, 633FEE9B1D3CD55A0014B822 /* numpad_0_default.png in Resources */, 633FEE591D3CD5590014B822 /* dialer_background@2x.png in Resources */,