I want to save an audio file to the Documents folder of my application while one of the classes in my app is streaming it. How can I do this?
Is it possible to save
If you are using the NSURLConnection or CFNetwork to download the file you can save it in the connectionDidFinishLoading delegate.
Take a look at Matt Gallaghers Streaming and playing an MP3 stream
(void)applicationWillResignActive:(UIApplication *)application
{
}
Write your code in the above method in App delegate file.
If you want to clean up your partially saved file on exit,
you could do worse than doing it from
- (void)applicationWillTerminate:(UIApplication *)application
in your app controller.