IOS - Storing Audio and Videos outside App Sandbox - ios

I am fairly new to IOS App Development. I have an app which plays audio and videos that are present in the App Package. Now I want my app to play audios and videos that are outside the App Package altogether i.e. if I uninstall my app the media files should not be deleted.
I have heard that all the apps can access media files that are added through ITunes. So I want to know the path of this folder(Kindly excuse me if you find my terminology vague. As I said I am fairly new to IOS App Development).

You cannot store the files outside app sandbox. Where as we can save image/video files to photos app
using, UIImageWriteToSavedPhotosAlbum/UISaveVideoAtPathToSavedPhotosAlbum
Please check developer documentation

Related

Is possible to save recorder audio file in musics in swift?

Hi in my app I have one feature to record audio and save it application directory. Client asking me is it possible to save audio file in musics?. That is client need to play recorded audio file without our application. I searched lot but cant find solution
No all iOS applications are sandboxed and the app data generated by the app cannot be used by other apps and can't to saved into other apps. The only way to share data between apps is through UIActivityViewController and it unfortunately does not provide any way of opening a file in music app. It is possible for jailbroken devices however.

ios swift store videos

I am doing a video Library app. I want store 6 videos locally in this app. When user download this app, it already had those 6 videos. Also, those videos might be replaced later by other videos if the app has been updated from server. So where should I put those videos? The sandbox document or other place?
The pre-uploaded videos will always be in your bundle, you have no method to replace it. All the other videos will be in your sandbox as it's the only place you can use.
You can have a look at on-demand-resource introduced in iOS9, which may be what you want.
The Documents folder is indeed the best place to store videos or other files that you want to persist between launches of the application.
Because cellular data can be expensive and to reduce initial download size, I recommend allowing the user to download the video files only after installing your app.
The concept I'm talking about can be seen by looking at this related question (code is in Objective-C, tho).

How to export downloaded audio file(from within app folder) to user accessible music folder in IOS

I am using Xamarin to develop an IOS app. Here the user has an option to download audio files to the document folder within the app, and play it later on.
But i would like to provide an option for the user to access it in music folder or somewhere else, so that user does not have to come back to app to listen it.
Like we save images to camera roll, can we save mp3 or any other audio file to default music folder in IOS. Any solution or ideas using xamarin or xcode are welcome.
Note: I already know about File Sharing with itunes, i am looking for something else explained above.
As I know this isn't possible due to the limitations within iOS

Is it possible to edit the metadata for an MPMediaItem?

I would like to make an iOS app that simplifies the process of organizing a users iTunes Library by allowing them to update metadata for their music files on the go.
Are you able to edit the metadata of files that are stored on an iPhone in the default music library or is access to this restricted by the sandbox? If you are able to do it how is it done?
You can't do it. The only thing that can modify the music library on a phone is iTunes (either the iOS version or the Mac version.)

Upload file from iPhone media library, in 2012

I'm about to launch a service where one of the feature is to upload files with an 'upload' button on a website. Some years ago, I made some program for iPhone, and I remember that it was impossible to upload an MP3 from the library, because each app is in its sandbox, though I was able to upload MP3 placed in the sandbox itself.
There is an old post on SO about the impossibility to upload from the library to a website:
A html5 web app for mobile safari to upload images from the Photos.app?
Is possible as of may 2012 for an iPhone/iPad to be prompted into the music library when clicking on an html upload button?
I don't think things will evolve in your way on iPhone.
I assume your service will not be in native objective-c.
look at the features of phonegap to see what interactions are currently possible :
http://docs.phonegap.com/en/1.8.0/index.html
You can probably develop a dedicated app to extract the music file using the Media Player framework and send them to your service, but I barely doubt it can pass the apple verification team.
Apple will not allow you to do this. Although it may be possible using private APIs or perhaps the Media Player framework, it will not be accepted by Apple.

Resources