简体   繁体   中英

How To Use Apple's Notification Sounds for User Notifications Swift

我想知道是否可以在用户通知中使用Apple的通知声音之一,而不是始终使用UNNotificationSound.default()作为声音,或者是否可以让用户进入设置以选择声音。

No, you cannot use any system sounds. The available system sounds are located in Library/Audio , but you can only use sounds from Library/Sounds .

However, you can still provide custom sounds the user can choose from through supplying the sound files and initializing using init(named:) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM