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?
AVFoundation is the full featured framework for working with time-based audiovisual media on iOS, macOS, watchOS and tvOS. Using AVFoundation, you can easily play, create, and edit QuickTime movies and MPEG-4 files, play HLS streams, and build powerful media functionality into your apps.
An object that plays audio data from a file or buffer.
#import <AVFoundation/AVAudioPlayer.h>
perhaps?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With