我在执行该通知是这样的:IOS推送通知声音不工作
-(void)scheduleLocalNotificationWithDate:(NSDate *)AlarmDate{
UILocalNotification *Notification = [[UILocalNotification alloc]init];
Notification.fireDate = AlarmDate;
Notification.alertBody = @"Time to wake up!";
Notification.soundName = @"sound.caf";
[[UIApplication sharedApplication] scheduleLocalNotification:Notification];
}
所以,当火灾通知有没有声音。可能是什么问题?
*文件名是正确的 *声持续时间:分32秒 *我使用的IOS模拟器 *声音是在“支持文件”,“物理”也试过项目文件夹 *设定绝对路径,但该也没有帮助。
UPD:不是本地的,推送通知(我的意思是,即使你关闭应用程序,将工作)