It drives me crazy, I believe that by that time I was trying to use all possible methods all the time, but my phone still decides to be silent. I just want it to sound now when I present a local notification. UILocalNotificationDefaultSoundNameNeither the user sounds that I added to my application package currently work . I wrote a simple countdown application that uses presentLocalNotification:when the countdown ends.
- (void)showLocalNotification
{
UILocalNotification *alarmNotification = [[UILocalNotification alloc] init];
alarmNotification.alertBody = [NSString stringWithFormat:@"fired at: %@", [NSDate date]];
alarmNotification.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] presentLocalNotificationNow:alarmNotification];
}
I also show UIAlertViewwhich will be initialized and displayed from AppDelegateupon receipt of the notification:
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"alert" message:@"Local notification was received" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
}
A local notification is received and a warning is displayed, in the notification center I also see that the notification has been started, only the sound does not work ...
, , , , push- , , ...
, ? - - , ?
, , - , ( , , , ).
, , , ...

