检索用户铃声库

时间:2012-07-13 00:26:25

标签: objective-c ios xcode

我想知道是否有办法检索用户的铃声或声音。我对他们的音乐播放列表不感兴趣,但是像30秒的音频剪辑可以用于uilocalnotifications。有谁知道如何做到这一点?谢谢!

1 个答案:

答案 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];
}