Can I delete a file from my iOS app bundle?

I currently have a large .sqlite data store with long string text. This is about 160 MB and will grow to around 200 MB when I finish. This is a read-only dataset.

Now I just put this file in my package and read it at runtime. However, this means that the application requires you to download 160 MB. Not optimal.

One solution is to gzip this file, send the gzipped version in the bundle, unzip it when you first start it and place it in the Documents / folder. This means that you download much less, but the total size of the application used on the device is (gzip'd size + ungzip'd size), which is also clearly not optimal.

I want to use the gzip solution, but after the first launch of the application, I want to uninstall the .gz version. Is it possible? How do I achieve this? What would be another good solution?

+6
source share
2 answers

Unable to delete the bundled file. The application must be signed, and if the package is modified in any way, it will not transmit the signature.

The only other solution I can think of is to set up a web service and, if necessary, download part of your application. This may or may not be a viable solution, depending on what your application does.

+8
source

As Paul says, everything that comes with your kit is part of the signature. I do not see how this is changing, as this is a fundamental part of signing applications.

Another classic approach is to compress the data in your bundle as much as possible, so you unpack it when you create a working repository.

0
source

Source: https://habr.com/ru/post/892986/


All Articles