I use the code below to download an AMR file from the Internet and play using AVAudioPlayer , but I get an unrecongnize selector sent to instance error all the time.
This method starts the download and playback:
- (IBAction)DisplayAudioPlayView:(id)sender { [self InitializePlayer]; } -(void) InitializePlayer {
Edit
Based on @Michael's advice, I am changing my code and this post . I changed my code to this:
NSURL *fileURL = [[NSURL alloc] initWithString: @"http://www.domain1.com/mysound.mp3"];
Now it played sound, but when I use http://maindomain.com/mysound.amr it does not play sound.
source share