Abdulrahman Jami
Abdulrahman Jami

Reputation: 113

How to play mp3 in iOS with Obj-C

I've a question in Objective-C, I'm working on an iOS application that should play a specific mp3 set of files -242 mp3 files exactly-, So could someone tell me what is the best way to play them all, I mean should I put them in a server, making them all local or what ? and how should I code them in Xcode.

Upvotes: 2

Views: 6915

Answers (2)

Burning
Burning

Reputation: 26

You could do something like this:

NSUrl *videoUrl = [NSUrl urlWithString:@"url"];
MPMoviePlayerViewController *playerViewController = 
    [[MPMoviePlayerViewController alloc]initWithContentURL:[NSURL URLWithString: videoUrl]];
[self presentMoviePlayerViewControllerAnimated:playerViewController];

Upvotes: 0

Antonis
Antonis

Reputation: 104

Apple provides AVAudioPlayer for handling audio media files. Another library you could use that works with Core Audio under the hood is EZAudio

Upvotes: 1

Related Questions