From 546befae511bbe6db998b47c3d92c931723d07d8 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Fri, 3 Oct 2014 12:01:20 +0200 Subject: [PATCH] Disable silent pushes: they are not handled when the user force-close the app, which is detrimental to overall user experience. --- Classes/LinphoneManager.m | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 980ac3728..2c8288cf5 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1842,16 +1842,11 @@ static void audioRouteChangeListenerCallback ( #else #define APPMODE_SUFFIX @"prod" #endif - NSString *params; - if( [[[UIDevice currentDevice] systemVersion] doubleValue] >= 7 ){ /// use silent push for ios7 devices - params = [NSString stringWithFormat:@"app-id=%@.%@;pn-type=apple;pn-tok=%@;pn-msg-str=IC_SIL;pn-call-str=IC_SIL;pn-call-snd=empty;pn-msg-snd=msg.caf", [[NSBundle mainBundle] bundleIdentifier],APPMODE_SUFFIX,tokenString]; - } else { - params = [NSString stringWithFormat:@"app-id=%@.%@;pn-type=apple;pn-tok=%@;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf", [[NSBundle mainBundle] bundleIdentifier],APPMODE_SUFFIX,tokenString]; - } + NSString *params = [NSString stringWithFormat:@"app-id=%@.%@;pn-type=apple;pn-tok=%@;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf", [[NSBundle mainBundle] bundleIdentifier],APPMODE_SUFFIX,tokenString]; - linphone_proxy_config_set_contact_uri_parameters(proxyCfg, [params UTF8String]); - linphone_proxy_config_set_contact_parameters(proxyCfg, NULL); - } + linphone_proxy_config_set_contact_uri_parameters(proxyCfg, [params UTF8String]); + linphone_proxy_config_set_contact_parameters(proxyCfg, NULL); + } }