My application uses a geo object and sends a notification.
By default, sounds are disabled in the settings - notifications for the application.
iOS 7 to be exact.
Does anyone know how to fix this?
Here is the code responsible for this:
UILocalNotification *localNotif = [[UILocalNotification alloc] init]; localNotif.fireDate = [NSDate dateWithTimeInterval:5 sinceDate:[NSDate date]]; localNotif.timeZone = [NSTimeZone defaultTimeZone]; localNotif.alertBody = [NSString stringWithFormat:@"You are near %@. Don't forget to check in!",place.name]; localNotif.soundName = UILocalNotificationDefaultSoundName; localNotif.applicationIconBadgeNumber = 0; [[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
source share