アラームを設定したいので、このコードを使用します。
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil)
return;
localNotif.fireDate = itemDate;
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.alertBody = @"Appointment";
localNotif.alertAction = @"View";
//localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.soundName = @"Iphone_Alarm.mp3";
//localNotif.soundName=@"sound.mp3";
localNotif.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
[localNotif release];
アラートは表示されますが、サウンドは再生されません。サウンド名には正しいケースとスペルがあります。デバイスでは、振動もありません。