From 7f9abfed95fb2e1c0ca728fdbd353950e3dbe7e1 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Wed, 9 Oct 2013 10:31:48 +0200 Subject: [PATCH] Fix bug where the ring sound would not stop in case of a push notification. --- Classes/LinphoneAppDelegate.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index d712838fb..8c500d7e3 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -207,6 +207,14 @@ [[LinphoneManager instance] enableAutoAnswerForCallId:callid]; else [LinphoneLogger log:LinphoneLoggerError format:@"PushNotification: does not have call-id yet, fix it !"]; + + if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { + // iOS7 fix for notification sound not stopping. + // see http://stackoverflow.com/questions/19124882/stopping-ios-7-remote-notification-sound + [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 1]; + [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0]; + } + } } }