向 UILocalNotification soundName 添加自定义声音

Add a custom sound to UILocalNotification soundName

我想做的是,允许用户录制音频然后将录制的音频用作警报声,我已经成功完成了录制部分,但无法将录制的音频设置为 UILocalNotification 声音。我已经 google 有一段时间了,我发现人们说除非它在主包中,否则不可能使用自定义声音。但是有一个名为 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 版本中添加了这一点。