Is it possible to use the existing Apple system sounds in my own app? I would like to write a sample app in Swift that does the following steps:
/System/Library/Audio/UISounds/
)So its basically the same, like when you choose a new ringtone on your iPhone.
I think some apps are using this sounds, or have they copied/bought it?
Thanks and regards Jens
You can use this Swift 5 code to play system sounds:
// import this import AVFoundation // create a sound ID, in this case its the tweet sound. let systemSoundID: SystemSoundID = 1016 // to play sound AudioServicesPlaySystemSound(systemSoundID)
The most up to date list of sounds I could find are here.
Documentation Reference
And this is what they all sound like: https://www.youtube.com/watch?v=TjmkmIsUEbA
Swift 4
import AVFoundation AudioServicesPlayAlertSound(SystemSoundID(1322))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With