diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m
index 1c0317f84..b7566cd2b 100644
--- a/Classes/LinphoneAppDelegate.m
+++ b/Classes/LinphoneAppDelegate.m
@@ -430,10 +430,17 @@
return;
NSString *loc_key = [aps objectForKey:@"loc-key"];
- NSString *callId = [aps objectForKey:@"call-id"];
- if (!loc_key || !callId)
+ NSString *callId = [aps objectForKey:@"call-id"] ?: @"";
+ if (!loc_key)
return;
+ if ([self addLongTaskIDforCallID:callId] && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
+ if ([loc_key isEqualToString:@"IC_MSG"])
+ [LinphoneManager.instance startPushLongRunningTask:FALSE callId:callId];
+ else if ([loc_key isEqualToString:@"IM_MSG"])
+ [LinphoneManager.instance startPushLongRunningTask:TRUE callId:callId];
+ }
+
// if we receive a remote notification, it is probably because our TCP background socket was no more working.
// As a result, break it and refresh registers in order to make sure to receive incoming INVITE or MESSAGE
if (!linphone_core_is_network_reachable(LC)) {
@@ -441,14 +448,6 @@
[LinphoneManager.instance setupNetworkReachabilityCallback];
}
- if ([self addLongTaskIDforCallID:callId] && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
- if ([loc_key isEqualToString:@"IC_MSG"]) {
- [LinphoneManager.instance startPushLongRunningTask:FALSE callId:callId];
- [self fixRing];
- } else if ([loc_key isEqualToString:@"IM_MSG"])
- [LinphoneManager.instance startPushLongRunningTask:TRUE callId:callId];
- }
-
if ([callId isEqualToString:@""]) {
//Present apn pusher notifications for info
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_9_x_Max) {
diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m
index ee2c27304..346e59fb0 100644
--- a/Classes/LinphoneManager.m
+++ b/Classes/LinphoneManager.m
@@ -2385,28 +2385,6 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
}
if ([LinphoneManager.instance lpConfigBoolForKey:@"backgroundmode_preference"]) {
- // register keepalive
- if ([[UIApplication sharedApplication]
- setKeepAliveTimeout:600 /*(NSTimeInterval)linphone_proxy_config_get_expires(proxyCfg)*/
- handler:^{
- LOGW(@"keepalive handler");
- mLastKeepAliveDate = [NSDate date];
- if (theLinphoneCore == nil) {
- LOGW(@"It seems that Linphone BG mode was deactivated, just skipping");
- return;
- }
- [_iapManager check];
- if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) {
- // For registration register
- [self refreshRegisters];
- }
- linphone_core_iterate(theLinphoneCore);
- }]) {
-
- LOGI(@"keepalive handler succesfully registered");
- } else {
- LOGI(@"keepalive handler cannot be registered");
- }
shouldEnterBgMode = TRUE;
}
}
diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m
index 52beba1ed..ef6e913ef 100644
--- a/Classes/PhoneMainView.m
+++ b/Classes/PhoneMainView.m
@@ -509,7 +509,7 @@ static RootViewManager *rootViewManagerInstance = nil;
- (void)startUp {
@try {
LinphoneManager *lm = LinphoneManager.instance;
- LOGE(@"%s", linphone_global_state_to_string(
+ LOGI(@"%s", linphone_global_state_to_string(
linphone_core_get_global_state(LC)));
if (linphone_core_get_global_state(LC) != LinphoneGlobalOn) {
[self changeCurrentView:DialerView.compositeViewDescription];
diff --git a/linphone-Info.plist b/linphone-Info.plist
index 5829898a7..2a5808f57 100644
--- a/linphone-Info.plist
+++ b/linphone-Info.plist
@@ -24,7 +24,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.16.5
+ 3.16.6
CFBundleURLTypes
@@ -53,7 +53,7 @@
CFBundleVersion
- 11
+ 0
ITSAppUsesNonExemptEncryption
ITSEncryptionExportComplianceCode
diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj
index e427bb881..d10075176 100755
--- a/linphone.xcodeproj/project.pbxproj
+++ b/linphone.xcodeproj/project.pbxproj
@@ -828,6 +828,20 @@
remoteGlobalIDString = FAB8A0141CAC546A00C6DFC1;
remoteInfo = KIFFrameworkConsumerTests;
};
+ 8C8686D41FFE675F0044501F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 630589F21B4E816900EFAE36 /* KIF.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 8CD87D4C1EF5105800ACA260;
+ remoteInfo = LinphoneManager;
+ };
+ 8C8686D61FFE675F0044501F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 630589F21B4E816900EFAE36 /* KIF.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 8CD87D541EF5105900ACA260;
+ remoteInfo = LinphoneManagerTests;
+ };
F08F119119C09C6B007D70C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
@@ -2306,6 +2320,8 @@
63058A071B4E816A00EFAE36 /* KIF.framework */,
633FC7C81CD7466400774B8B /* KIFFrameworkConsumer.app */,
633FC7CA1CD7466400774B8B /* KIFFrameworkConsumerTests.xctest */,
+ 8C8686D51FFE675F0044501F /* LinphoneManager.framework */,
+ 8C8686D71FFE675F0044501F /* LinphoneManagerTests.xctest */,
);
name = Products;
sourceTree = "";
@@ -3230,6 +3246,20 @@
remoteRef = 633FC7C91CD7466400774B8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ 8C8686D51FFE675F0044501F /* LinphoneManager.framework */ = {
+ isa = PBXReferenceProxy;
+ fileType = wrapper.framework;
+ path = LinphoneManager.framework;
+ remoteRef = 8C8686D41FFE675F0044501F /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 8C8686D71FFE675F0044501F /* LinphoneManagerTests.xctest */ = {
+ isa = PBXReferenceProxy;
+ fileType = wrapper.cfbundle;
+ path = LinphoneManagerTests.xctest;
+ remoteRef = 8C8686D61FFE675F0044501F /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */