I am using an iPhone 13 Pro for testing running iOS 16.0. Code was compiled using xCode 14.0. This is my code:
import AudioToolbox.AudioServices
@IBAction func buttonPressed(){
let systemSoundID: SystemSoundID = SystemSoundID(1005)
AudioServicesPlaySystemSound(systemSoundID)
}
This would play an audio alert whenever the button was pressed.