Save audio file from app to iPad/iPhone library - iphone

I have been trying to figure out how to do this for most of the day, but I haven't been able to find much help. We have this multimedia app that allows users to view pictures, videos, and music/ringtones about the particular subject. I know you can save images using UIImageWriteToSavedPhotosAlbum and you can save a video file using UISaveVideoAtPathToSavedPhotosAlbum. But I can't figure out how to allow the user to save an audio file. All the files are stored within the app, so its not like I'm trying to stream or download them from the internet. Does anyone have any pointers on how to do this?

The official SDK only allows you to retrieve information with MPMediaLibrary, no write access.

Related

Flutter - Upload Video to Youtube

In my app I need the ability to take and upload or save a short 5 to 15 second video. I also need to be able to save the video if the user is offline, and upload it when connected to internet.
I can create the video file with the plugin image_picker, I tried to save it to the users gallery using plugin image_picker_saver but that seems to only handle images.
So I will probably have to use something like path_provider to save it to local storage (again examples of writing files are images as byte data)
When connected is there a way to upload a video to a Youtube account ?
I have read up on some Youtube plugins, but they are geared towards playing videos.
I was thinking of using WebViews to pop up the m.youtube.com/upload page but once you start an upload it goes to the desktop www.youtube.com
Other option to consider is using Firestore as the upload destination when they have a connection, but I would still have to manage offline local storage.
Thank you any help
Edit RE: comments below
Here is what I get when trying to capture a Landscape video on iPhone X with camera plugin:

How can you access audio files saved on an iPhone using PhoneGap?

I'm trying to make an application on the iPhone using PhoneGap. I know that you can access photos stored in the phone's photo library using navigator.camera.PictureSourceType.PHOTOLIBRARY. Is there an equivalent of this for accessing audio files on the phone? I've looked through the documentation for PhoneGap, but haven't been able to find anything.
Thanks in advance!
Firstly iOS give us the limited access to the media files . By navigator.camera.PictureSourceType.PHOTOLIBRARY you can only access the camera roll. you cant access the pre stored video also using this code . SO i don't think you can access the audio files stored in the iPhone by using any way .

iphone dev creating .mov or .wmv file from images

I want to create physical .mov or .wmv file from sequence of images for an iphone app, means user will provide me with some images and i will create a video for the user, and if user wants .mov or may be .wmv file, then in that case i will create a video file for the user, and i also want to add sound in that file, now i have searched a lot for this but didn't find anything very use full, can any one tell me is there any tutorial or help full material to do this, or provide me some guidance for how to go about this, thanx and regards Saad

Is there a maximum size to NSDocumentsDirectory? Are the contents accessible outside the app?

Is there a limit to the amount of data that we can put to the NSDocumentsDirectory? My application allows photo and video capturing and I am saving this data to the NSDocumentsDirectory. Can I keep on adding images and videos to the app then? Also, are these images and videos accessible outside the app? Can we delete them using iTunes? Help please!
You should start with reading apples programming guide for file system access.
And remember: Whenever something in the apple docs reads like a hint or a recommendation, it actually says "do it that way or we won't let your app into our store".

Play specific local IPhone Video

I am in need for some help as I am stuck with a problem with my current IPhone application. I won't go into every details but the mainline is as follow:
I am currently playing videos from a remote URL. Everthing up to this point is working. But we need to add a certain validation as if the video exists on the local IPhone, play this version and otherwise, get the remote version. I get these informations from an XML feed and have the name of the video and it's remote URL.
I've implemented the ALAssetLibrary as a way to retrieve the locals video and transfered 3-4 videos with custom names. After some struggling, I could play these local video. But while I loop through them, all I get is names like 00001.jpg, etc.
Is there any way to get a local video name ? I don't mind if this needs another library but I would appreciate if someone could point me a way of doing it.
Thanks for your time,
AP
You don't have access to the local filenames, and even if you did those filenames would probably not be what you are expecting (i.e. Apple can and probably does rename them while saving them to the Camera Roll).
You can check the metadata on the ALAssetRepresentation for the video to see if a suitable name or other identifier can be found in there. You might also be able to retrieve the raw data and hash it, but that would fail if Apple does any recoding or metadata alteration when saving the video. If your program itself downloads and saves the videos to the Camera Roll using writeVideoAtPathToSavedPhotosAlbum:completionBlock:, you could store the returned assetURL to remember the correspondence. Or you could save the videos to your app's local storage instead of to the Camera Roll, but that would prevent the user from managing the videos with Apple's photo application and such.