cfischer cfischer - 1 year ago 76
Objective-C Question

What Frameworks and imports are necessary to use AVAudioPlayer on iOS?

I'm trying to play a sound on iOS using AVAudioPlayer. I added the AVFoundation.framework and MediaPlayer.framework and tried to import AVAudioPlayer.h (this part didn't work), but I still can't instantiate the AVAudioPlayer class.

What am I doing wrong?

Answer Source

#import <AVFoundation/AVAudioPlayer.h> perhaps?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download