Suggested approach: An easy answer is AVAudioPlayer
, as long as you're clear about keeping the object alive while its sound plays. If you were feeling more confident you could discuss the pros and cons of using AudioServicesCreateSystemSoundID()
instead – it's a slightly odd API, but it definitely works.
Estimated difficulty: Intermediate
See the full list of iOS interview questions
Link copied to your pasteboard.