0

Is there any way I can save several files to a kind of bundle/package/container inside an iOS app. I want to store the database, images, textfiles, etc on it but want to be able to backup/send/share that single bundle/container when needed.

I currently save a reference of the stored image and text file for entries in the sqlite database but it will be easier to just backup a single file instead of a bunch of files.

nizx
  • 690
  • 1
  • 6
  • 13

2 Answers2

0

If you are storing all the things in document directory then for your specific application all the things will be stored in document folder.

so you can easily get all the things from that document folder.

the path of the document folder when you run your application in simulator is like this for database.

/Users/userNameFolder/Library/Application Support/iPhone Simulator/7.1/Applications/41540AAE-A8F4-4192-82C9-F6075535F2D5/Documents/DataBase.sqlite

and for text file also its like this

/Users/userNameFolder/Library/Application Support/iPhone Simulator/7.1/Applications/41540AAE-A8F4-4192-82C9-F6075535F2D5/Documents/textFile.txt

so in above paths you can find all the things in Document folder only.

Hope this helps...

Sam
  • 431
  • 7
  • 23
0

How about zipping the files? The sip-file is a container, too.

I have used zipzap and found it easy to implement.

Olaf
  • 3,042
  • 1
  • 16
  • 26