Convenience API for playing iOS system sounds
I made this for personal use, but feel free to use it or contribute.
// AudioToolbox
AESound().playSystemSound(.uisounds_go_to_sleep_alert)
// AVFoundation
let output = AESound()
let path = SystemSound.uisounds_go_to_sleep_alert.rawValue
output.prepareSound(atPath: path)
output.playSound(atPath: path)
output.cleanupSound(atPath: path)
.Package(url: "https://github.com/tadija/AESound.git", majorVersion: 0)
This code is released under the MIT license. See LICENSE for details.
link |
Stars: 3 |
Last commit: 3 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics