SystemSound not working after updating to iOS 16 and xCode 14.0

Viewed 19

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.

0 Answers
Related