Saving image in sqlite versus application's documents directory

Discussion in 'iOS Programming' started by arnieterm, May 27, 2009.

  1. arnieterm macrumors regular

    Aug 28, 2008
    Hello all,
    I am working on an iphone application that requires saving images. I would like to know what is the best way to store these images
    Saving in sqlite table or in documents directory of the application

    Though currently I am saving the images in documents directory and the respective path as string in the sqlite table. But here is one issue on iphone/simulator. The path generated is something like
    this [say for iphone]
    When we again run the application
    the applicationid changes and the above path becomes invalid and the application is not able to read the image back
    Will this problem also occurs once you upload the application on app store and makes available a new version later
    Please make me clear as well as correct me wherever appropriate

  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Best is to save the images as files in the file system.

    Don't save the full path. Save the path relative to a known path, like the Documents folder.

Share This Page