Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to delete a file from my iOS app's bundle?

Tags:

ios

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?

like image 879
Nektarios Avatar asked Jul 18 '11 12:07

Nektarios


People also ask

Does deleting app delete data iPhone?

The app and its documents and data will be removed from your iPhone or iPad. Reinstall the app from the App Store. After deleting the app (and its data, which happens automatically upon deleting the app), you can reinstall it from the App Store and start from scratch.

What happens if I delete the app files?

Clearing an app data DO delete files from your phone. Becuase those files are associated directly with the apps that you are deleting. Any other files which are not AUTOMATICALLY created by the app being deleted will not be deleted when you clear an app's data.

How do I change my IPA bundle identifier?

You cannot change the bundle identifier of an app. You can create a second app that looks and behaves exactly the same and has a different bundle identifier, but the bundle identifier is what makes it that app. It's the identity of the application.


1 Answers

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.

like image 195
Paul Tiarks Avatar answered Oct 09 '22 18:10

Paul Tiarks