我在執行該通知是這樣的: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:不是本地的,推送通知(我的意思是,即使你關閉應用程序,將工作)