Reputation: 10371
I currently have a large .sqlite data store of long string text. It's about 160MB and will grow to about 200MB when I'm completely done. This is a "read only" data set.
What I do now is simply place that file in my bundle and read it during runtime. However, that means the app requires you to download 160MB. Not optimal.
One solution is to gzip that file, ship the gzipped version in the bundle, uncompress it on first run, and put it in the Documents/ folder. This means you'd download far less, but the total size the app uses on the device is (size of gzip'd + size of ungzip'd) which is obviously not optimal either.
I want to use the gzip solution, but after application's first run, I want to delete the .gz version. Is this possible? How do I achieve it? What would another good solution be?
Upvotes: 7
Views: 2910
Reputation: 17969
As Paul says, anything in your bundle is part of the signature. I can't see this changing as it is a fundamental part of signing apps.
Something else to consider is, rather than storing a compressed sqlite database, store a more optimal form of the data in the bundle. Then build the sqlite database on first run and do an optimised bulk import
Upvotes: 1
Reputation: 1921
It is not possible to delete a file in the bundle. The app must be signed and if the bundle is modified in any way, it will not pass the signature.
The only other solution I can think of, is to setup a web service, and have your app download portions of your content as necessary. This may or may not be a viable solution, depending on what your app is actually doing.
Upvotes: 10