Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I record currently playing audio on the iPhone?

I'd like to record what the iPhone is currently outputting. So I'm thinking about recording audio from Apps like Music (iPod), Skype, any Radio Streaming App, Phone, Instacast... I don't want to record my own audio or the mic input.

Is there an official way to do this? How do I do it? It seems like AVAudioRecorder does not allow this, can somebody confirm?

like image 694
Simon Avatar asked Feb 03 '12 08:02

Simon


2 Answers

Officially you can't. The audio stream belongs to the app playing it ,and iOS.

The Sandbox paradigm means that a resource owned by your App can't be used by another App. Resource here means Audio/Video stream or file. Exceptions are when a mediator like Document interaction controller are used.

If you want to do this you'd have to start with deducing AVFoundation's private methods and find out if theres a way there. Needless to say this it wouldn't be saleable on the App store and will probably only be possible on a jailbreak.

Good Luck.

like image 60
Warren Burton Avatar answered Sep 30 '22 21:09

Warren Burton


TLDR;

This is only feasible only from time to time, as it's a time expensive process.

You can record the screen while listening your songs on Spotify, Music or whatever music application. This will generate a video on your Photos application. That video can be converted on MP3 from your computer.

like image 32
alxsimo Avatar answered Sep 30 '22 19:09

alxsimo