how to store video file in sqlite database in iphone? - iphone

I want to capture videos in my application and this video should be stored in sqlite database.
pls tell me the code how can i do this?
thanx.

If you are trying save the entire video in database please avoid that approach,its entirely wrong .Save that videos in your document folder with some name and save that name in database. Your approach take so much memory

Related

What is the best approch to save images and xml file in device (sqliteDB)

I am creating an iPhone application in which i have to store images and xml files locally in device (sqliteDB). So my question is what is the best way to do this?
I have two approaches in my mind.
1) Store images and xml in device and just save references of them in to sqliteDB.
2) Encode images and xml file to Base64 and save to sqliteDB directly.
Which will be more wise and why?
Do anyone have any other way to perform this by which application can run smoothly.
you can store both xml and images in (sqllite) i think it is best because we can perform CRUD operations .
Saving and retrieving images to and from SQLite in iOS
you can find how to save images in sqllite
http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk_store-data/
above tutorial is about how to use sqllite in ios and save data in sqllite ,saving all these
data in sqllite is a wise way to manage the resources ..

Best way to store images in iOS

I was wondering if anyone could suggest the best way for me to store images for my app.
I want to be able to provide an XML update functionality that will allow the user to update their app with a new set of images. I was wondering what the best way to do this was as i need to read and write to the store location. Is storing them in a sqlite database the best way or am i able to use the filesystem to do this without the chance of the iPhone deleting any of the downloaded images?
Thanks
You can write to the filesystem, every app in iOS is sandboxed and has access to his own documents folder.
I would suggest to write on filesystem and only save the urls on the database as that is more performant than saving blobs on a database.
Apple has a good write up about the iOS filesystem.
Alternatively you could implement a solution using SQLite, Apple mentions it in the: Large Data Objects (BLOBs) section here:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreData/Articles/cdPerformance.html#//apple_ref/doc/uid/TP40003468-SW5

How can I save images to iphone directory and retrieve it?

I want to save image in iphone album and retrieve them on particular index, how can I?
I have to save profile of many people, along with their images, so how can I access such concept?
Do not save images in iPhone album if they're your application related only.
The better way is to create directory in your application documents directory and store them there. Or even better, do use CoreData and transient property to store image on your disk to keep your data well organized.
you also have choice to save the image in sqlite3 database and retrieve it when needed.

Save audio file from app to iPad/iPhone library

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.

Saving video from UIImagePickerController to Core Data on iPhone OS

I need some guidance on how to save video data to core data so that I can retrieve it again later.
I have no problem retrieving the NSURL that is returned from UIImagePickerController but then I'm not sure how to go about saving the video data to Core Data. I can already save and retrieve regular images from Core Data but I'm not sure how to do the same for video data.
If I could be pointed in the right direction I would really appreciate it.
I think the idea here would be to store the URL in your core data store, and let the video itself be stored in the filesystem.