Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3623792
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:25:38+00:00 2026-05-18T23:25:38+00:00

I am developing an app that lets the user record videos and photos. Now

  • 0

I am developing an app that lets the user record videos and photos. Now I am wondering what is the best way to store them?

The first idea is of course to save it in the user’s photo library, just as if he had recorded the photo from the Camera app, and use a reference to the files. Now there’s the problem that the user can access and delete files from the Photos application, which may be still needed by my app. I don’t think that I can prevent the user from deleting photos, but how do I deal with the inconsistency my app will suffer from?
The other way would be to take care of the storage myself. My app already uses Core Data, so I could convert the media files using an NSValueTransformer to an NSData object and store it as BLOB in Core Data. Then there are some more questions regarding the performance. I know that an SQLite-based Core Data can perfectly handle databases of several GB in size, but loading large data objects will take some time anyway. The obvious advantage is that the user is not going to make my app inconsistent, but is the performance penalty acceptable? And most of all: If I use a UIImagePickerController to capture photos and videos, it is going to save it in the library anyway. To save it in Core Data, I would have to take the photo from there, convert it to an NSData object, save it and delete it from the library again. This does not seem to be the right way to me. Also, UIKit provides me a function to get an NSData object from a photo via UIImageJPEGRepresentation(), but there seems to be no such function for converting videos.

All in all, because of all those unanswered questions, I would like to use the first approach. But the inconsistency problem puzzles me. What is the best practice to deal with it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:25:39+00:00Added an answer on May 18, 2026 at 11:25 pm

    For the photo:

    UIImagePickerController will return us an UIImage inside the memory, so you wouldn’t have to do anything, not taking it out of the user’s photo library and save it in your core data…

    For the video:
    You can take the data out using NSData *data = [NSData dataWithContentsOfFile:] or [NSData dataWithContentsOfUrl:] to get the NSData object of the video. You can get the videoUrl easily

    So, I just corrected some of your wrong assumptions first.

    You don’t need to save it directly to CoreData. You can save it to your application’s document folder and then users will not be able to delete it. Moreover, saving to the application’s document folder and only save the link to CoreData will also save your soul from handling big data object.

    The problem may be that you need to deal with your file storage.

    I don’t think there is a best practice here.

    Saving in user’s photo library will help the users see their photos and videos easier without accessing your app

    Saving in CoreData may be easier for you and may be faster some time

    Saving into file storage may help you not dealing with some binary problem when loading video because Apple MPMoviePlayerController may help you

    For me, because I don’t use much SQLite and Core Data, I choose to store into file system

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.