0
我想设置alrms,所以我使用这段代码。alrm sound not works
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";
//[email protected]"sound.mp3";
localNotif.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
[localNotif release];
它显示警报但不播放声音,声音名称有正确的大小写和拼写。在设备上它也没有振动。
任何设置此设备上的任何设置。我可以在模拟器上播放声音。 – Ishu 2011-02-14 05:19:48