庵建立一個本地通知,並且每一件事是偉大的,但沒有聲音,即使我已經設置了完善的name屬性默認通知聲音名稱。 P.S:聲音不適用於模擬器或設備。UILocalNotifications火災無聲音
這是我的代碼..
UILocalNotification *aNotification = [[UILocalNotification alloc] init];
aNotification.timeZone = [NSTimeZone defaultTimeZone];
aNotification.alertBody = _reminderTitle.text;
aNotification.alertAction = @"Show me!";
aNotification.soundName = UILocalNotificationDefaultSoundName;
aNotification.applicationIconBadgeNumber += 1;
[[UIApplication sharedApplication] scheduleLocalNotification:aNotification];
所以任何想法? :)
您的設備是靜音嗎? – Coder404
nop,模擬器呢?這 – Abo3atef
可能重複:http://stackoverflow.com/questions/23532706/why-doesnt-my-uilocalnotification-play-any-sound?rq=1 –