我正在尝试向我的 UNNotification 添加声音。而不是我自己的自定义声音或默认声音,我想使用 AVFoundation 中的 iOS SystemSounds 之一。我可以通过以下方式获得声音:
import AVFoundation
...
let systemSoundID: SystemSoundID = 1016
AudioServicesPlaySystemSound(systemSoundID)
如何将此声音添加到我的通知中?
我正在尝试向我的 UNNotification 添加声音。而不是我自己的自定义声音或默认声音,我想使用 AVFoundation 中的 iOS SystemSounds 之一。我可以通过以下方式获得声音:
import AVFoundation
...
let systemSoundID: SystemSoundID = 1016
AudioServicesPlaySystemSound(systemSoundID)
如何将此声音添加到我的通知中?