I have been stuck on the same problem for a while, and I hope someone can help.
I created an alarm clock app, which uses UILocalNotification to play an alarm sound at the selected time.
My app was working fine on the simulator, but when I started testing it on an iPhone, the notification sound stopped ringing.
I have the sound in .caf, about 20 seconds long, correct capitalization and everything, so I really can't figure out why it doesn't ring. I use the same sound file elsewhere in the app, and it works fine, so I do know the file is loaded properly. The notification shows up properly, just without the sound. And yes, I made sure the volume is turned up on my iPhone.
Does anyone have any idea why this is happening? Below is my code.
Thank you in advance! -Ema
UILocalNotification* alarm = [[ULocalNotification alloc] init];
alarm.fireDate = pickedDate;
alarm.timeZone = [NSTimeZone defaultTimeZone];
alarm.hasAction = YES;
alarm.alertAction = @"SNOOZE";
alarm.repeatInterval = 0;
alarm.soundName = @"Alarm11.caf";
alarm.alertBody = @"Alarm";
[app scheduleLocalNotification:alarm];