Reputation: 24912
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?
Upvotes: 6
Views: 6256
Reputation: 13716
According to the Apple documentation, AVAudioPlayer has been available since iOS 2.2.
Make sure you're using the following import:
#import <AVFoundation/AVAudioPlayer.h>
Upvotes: 3