Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

arnieterm

macrumors regular
Original poster
Aug 28, 2008
201
0
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]
/var/mobile/app...../applicationID/Documents/myimage.png
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

Thanks
Arnieterm
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.