简体   繁体   English

如何将Apple的通知声音用于用户通知Swift

[英]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 . 可用的系统声音位于“ Library/Audio ,但是您只能使用“ Library/Sounds

However, you can still provide custom sounds the user can choose from through supplying the sound files and initializing using init(named:) . 但是,您仍然可以通过提供声音文件并使用init(named:)初始化来提供用户可以选择的自定义声音。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 Apple 的 swift-format 与 Xcode 一起使用? - How to use Apple's swift-format with Xcode? 如何正确搜索和使用Apple的Swift开发人员文档? - How to properly search and use Apple's developer documentation for Swift? 如何将用户与涉及Apple状态通知的自动续订订阅相关联? - How do I associate a user with an auto-renewable subscription involving Apple's status notifications? 远程通知iOS 10中的自定义声音,swift 3 - Custom sounds in remote notifications iOS 10, swift 3 如何在Swift中使用本地通知? - How to use local notifications in Swift? 如何从通知中心Swift中删除特定的推送通知 - How to remove a specific push notification from notifications center Swift 如何为 Swift 中的 FCM 通知添加默认通知声音? - How to add default notification sound to FCM notifications in Swift? iOS 如何在 Shared/AppGroup/xxx/Library/Sounds 中播放自定义通知声音文件 - iOS how can i play a custom notifications sound file where it`s in Shared/AppGroup/xxx/Library/Sounds 如何快速使用苹果的 Accelerate 框架来计算真实信号的 FFT? - How to use apple's Accelerate framework in swift in order to compute the FFT of a real signal? Apple的图书馆参考书使用哪个版本的swift? - which version of swift does Apple's library reference use?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM