gpt4 book ai didi

ios - 向 UILocalNotification soundName 添加自定义声音

转载 作者:行者123 更新时间:2023-11-29 12:08:52 24 4
gpt4 key购买 nike

我想做的是,允许用户录制音频然后将录制的音频用作警报声,我已经设法完成了录制部分,但无法将录制的音频设置为 UILocalNotification 声音。我用谷歌搜索了一段时间,我发现人们都说除非它在主包中,否则不可能使用自定义声音。但是有一个名为 AidaReminder 的应用程序可以满足我的要求,所以有人知道该怎么做吗?

最佳答案

根据 https://developer.apple.com/library/prerelease/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW6 :

The sound files can be in the main bundle of the client app or in the Library/Sounds folder of the app’s data container.

(添加了强调和格式)

这实际上是我第一次注意到这一点,不确定情况是否一直如此,或者是否在最近的 iOS 版本中添加了这一点。

关于ios - 向 UILocalNotification soundName 添加自定义声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34132588/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com