Search This Blog

Sunday, 23 March 2014

Notification issue -iOS

Hello Friends,

Seems  like Apple is not serious with there job ... ;) , i found another bug in iOS 7 , what happened was i triggered a local notification from my app only when my app is in background , local notification has Sound file which is supposed to be played when notification is delivered to user. And WHOA, when user taps on local notification and app becomes active, local notification sound kept on playing whereas it was supposed to be stopped. Then with little R&D , i found that this issue is with iOS 7 only and its working fine for previous versions.

       So enough talks ... phewww ...here is the function to fix this issue


//Fix Local Notification sound issue for iOS 7
- (void)fixLocalNotificationforiOS7{
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
        [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 1];
        [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0];
    }
}



Happy programming... :)

CHAO...Signing out...

No comments:

Post a Comment