我想知道是否有办法检索用户的铃声或声音。我对他们的音乐播放列表不感兴趣,但是像30秒的音频剪辑可以用于uilocalnotifications。有谁知道如何做到这一点?谢谢!
答案 0 :(得分:2)
看到这个答案。 how to get the system ringtones programmingly in ios?
如果您仍想发出音频通知,则此article可以帮助您入门。
您似乎可以为soundName属性分配文件名,或者传递UILocalNotificationDefaultSoundName
(我猜的是)用户选择的通知声音。
- (void)scheduleNotificationWithItem:(ToDoItem *)item interval:(int)minutesBefore {
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.soundName = UILocalNotificationDefaultSoundName;
...
[localNotif release];
}