How to copy audio file from iPhone's filesystem to asset library programmatically - iphone

I have an audio file that I saved from stream into ~/Documents folder on iPhone.
I just wanted to make this file visible to user as (s)he can play it using iPod program or put that file into his/her song's album!

Unfortunately, this is not possible. Access to the iPod library is read-only at the moment.

Related

Possible to move downloaded mp3s from application to iPod?

I was looking to code an iPhone application however, i was not sure if the following is possible :
Download an mp3 from an external site (through the application)
Once the mp3 has been downloaded, automatically add it to the usual iPod application, so it is visible in the user ipod songs list.
Same for videos too (download video[mp4] and directly transfer it to the usual videos app)
If the above is not possible, can i directly play the downloaded mp3 in my application ? What would i require to play an mp3 in my application ? Are there open source mp3 players available that i can integrate with my application ?
Thanks for any help, i really appreciate it.
Once the mp3 has been downloaded, automatically add it to the usual iPod application, so it is visible in the user ipod songs list.
No, that's not possible. The iPod library is not writable by third-party apps.
Same for videos too (download video[mp4] and directly transfer it to the usual videos app)
Not possible, either.

Can I copy a part of an audio file stored in Ipod Library and save it with different name?

Hi I have went through a lot of searching and have deduced that
1) I can query for a specific audio file from Ipod Library and can play it using MPMusicPlayerController Library. But the problem is I cannot copy a part of this song and save it with diffrent name.
2) Using AVAudioPlayer I can modify or copy a part of an audio file but the problem is the audio file must be present in Application's resource folder. It doesnot allow me to choose a file from Ipod Library.
My requirement is to choose a file from Ipod Library and save a part of the same audio file with diffrent name.Please suggest how this can be achieved. There is one application which is doing similar task, but I cannot figure out how it is doing it.
http://itunes.apple.com/us/app/custom-ringtone-creator/id394095644?mt=8
Any suggestions would be highly appreciated. Thanks in advance
See here:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/62807-export-audio-m4a-alac.html

downloading a movie file and placing it in the Videos directory... is that possible

I want to programattically pull a movie file down into a NSData object and write it to iPhone disk in the movies directory so that the user can open up their iPhone iPod section and watch the movies from there... Is that possible?
Or do I need within my app to create a 'viewing' area, download the files to NSHomeDirectory add a folder in Documents and store the data there?
Thanks for any answers...
Assuming an iPhone Store application, this is not do-able, as the Movie directory is not accessible to the sandboxed application.
Of course, you're free to download the movie to a location accessible to your application, and playing the movie inside your application.

Can audio files be saved like photos and movies in iphone using objective C?

If our iphone application uses the inbuilt camera to click any picture, for saving the image into iPhone's photo library, we use UIImageWriteToSavedPhotosAlbum method. Likewise, to store any video recording into the iPhone, we use UISaveVideoAtPathToSavedPhotosAlbum
Is there any method to save any audio file into iPhone's Sounds library akin to both the methods mentioned above?
There is no way to import audio into the iPod application from the phone. iTunes (on the computer) is currently the only way. You do have a few options to save the file though
1) Create a movie on your own with just the audio
2) save it to disk locally (in the documents directory) and provide a way to get it off the phone (such as CocoaHTTPServer)
3) Email it.
4) Upload to a server

Where are downloaded sound files saved?

When I download a sound file in my iPhone, in which directory is it stored?
There is no 'sound file directory'.
Safari cannot download files to the iPhone and if you download a sound file from code you will receive the data in an NSData object. From there it is up to you where you write the file (or even if you write a file, you could use the data without saving it). However you will still not have many options on where to save the file because of the iPhone sandbox.