Browsing files within iphone application - iphone

I have problem to browse different types of file.
I know browse music file and Photo from iPhone but i want to browse all typs of file doc,zip,ppt,xls,pdf files within a application. like music and photo library.
Is there any way to browse all types of files?
Thanks you,

You can use NSFileManager to browse the files in your application's little sandbox, but you're gonna have to work out a way to get the files there first (download or whatever), provided you don't include them with the application. If you want to interact with the files then you're in another ball game.

What do you mean browse "all types of files"? Files on the device itself? If so, you can only access files within your application's sandbox. You can get a list of a directory using NSFileManager and then render the results into a UITableView.

Related

[Flutter]How to download video to app, and make it accessible only through the app (Similarly to Youtube/Netflix)

i'm fairly new to Flutter and is currently working on a course app that requires downloading the videos to the app.
The downloaded video will only be accessible through the app just like Youtube and Netflix, and will be hidden/encrypted from gallery. Would greatly appreciate if someone if someone could point me in the right direction in building this feature.
On iOS and Android your app has it's own isolated folder for storing documents. Items stored there are not intended to be accessible to the user outside of your app. This folder isn't scanned by the Gallery or accessible to other apps on the device. (However, with a little effort a user can access the files so this is not a complete solution where security is an concern. You would need to add encryption if you didn't, say, want a motivated user to copy the video file to a PC and be able to play it.)
the path_provider plugin gives your Flutter app common file locations on a device. The private app folder location is retrieved with getApplicationDocumentsDirectory()
"Download video" is a vague requirement. Most video on the internet (Netflix, Youtube) is provided via HLS or DASH for streaming, which you do download but the video is split up into many files- sometimes thousands of files for a single video. The dart:http package is likely what you're going to want to use to get/download the files (unless the video files aren't available via HTTP/HTTPS, then you'll need a different transport-specific library, like FTP, RTSP, etc.)

xcode move audio files

I am creating iPhone application using PhoneGap. In that I have used navigator.captureAudio method to record the audio. Normally the recorded audio files stored inside the Application(tmp folder). So the application size getting increase each time while recording. I don't want to keep the recorded file inside my application.
Is there any way to move this file from application storage to outside(like music)? How to move this files in Xcode? Any suggestion on this?
Thanks
AFAIK any files your application will create must be stored within the Application directory structure. This is because each iOS app operates within its own sandbox.
See Apple's docs on this: File System Programming Guide.
You can interact with other applications such as the music app using MPMusicPlayerController, but I've never tried adding files to this, only playing files.
You could always experiment with iCloud integration? Although this will still appear in your sandbox I think.

iPhone: Saving picture/data to "public" folder?

I want to implement a backup feature in the app I'm working on, that simply puts an image and some data in a folder that can be accessed through itunes or similar.
But is this possible, and what can be done?
Point of the feature is that if (for some reason) the image and data isn't sent to my server, the user will have the ability to extract it to a pc/mac, so that the image and data isn't lost.
Any help is appreciated.
Enabled iTunes file sharing in your app's settings and then write your file to the Documents folder in your app. This will then allow them to see the file through iTunes.

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.

Reading iTunesMovies file in iPhone?

In iPhone, the iPod app saves the media files (audio, video) with strange names and in weird folders (F00,F01 etc). There is a file named iTunesMovies in iPhone, which contains all the information about the metadata of those video files and how they are to be displayed in iPod app. I copied that to my Mac also, and when i tried to open that file in textEdit, it showed some alien characters which made me believe that it is encrypted may be(Thats just a wild guess).
I want to read/change the contents of that iTunesMovies file. Can i do that? Is there any Framework which deals with that iTunesMovies file?
Thanks in advance
I don't think there's a framework to do this, but you can probably do it yourself by reading the file into an NSData object, then manipulating how you would like. Your app will have to be running outside the sandbox, as well. Something I don't know how to do.
Keep in mind that this isn't allowed by Apple, so any apps you make that use this would have be distributed through other means.