Is it possible to save a recorded audio file on iOS outside the App sandbox?

330 views Asked by At

I am working on a WhatsApp kind of App. Users have the option of transferring Videos, Images, audio etc. Using ALAsset suite of framework, I can save the Images and Videos in the Device photo library etc. For Ex

- (void)writeVideoAtPathToSavedPhotosAlbum:(NSURL *)videoPathURL
                       completionBlock:(ALAssetsLibraryWriteVideoCompletionBlock)completionBlock

My Question is can I do something similar with a Audio file? Right now I am saving the Audio file within the sandbox itself say NSDocumentsDirectory etc. Is there a provision for saving a recorded audio file, received audio file in some kind of System storage like the Photo library for ex.? I don't want to bloat the App with regularly received Audio Files

Regards 0x6d6e

1

There are 1 answers

3
Ram Suthar On BEST ANSWER

No, this is not possible till iOS 8. You are doing it right. You need to save the audio in your app sandbox. Work around can be converting audio file to video file, but that is not a win.