I realize that you can't delete an item from the iOS bundle since it's signed, but is there a way to include a file and have it not be part of the "signed" bundle, but still present on install?
Use case is basically install the app, read the contents of the file, store in the keychain, then delete the file.
Thanks for any help and guidance.
Of note -> The app can't access the internet to fetch this file. And being able to delete the file (or wipe the file's contents) after reading it once is all I really need. Also, we're ad-hoc distribution here, we don't go through any App Approval process.
The short answer is No. The app bundle is read only.
As others have pointed out, the usual solution for delivering data in the bundle that needs to be editable is to copy data from the application bundle to the documents (or other app folder) so that you have an editable copy. However, you still cannot delete anything from the bundle.
Since your project has restrictions where you cannot transmit the data through the Internet, and you are delivering the application via Ad-Hoc distribution, it seems like your primary concern is that the delivered file cannot be accessible, even on a jail broken device.
Since you cannot delete the file to make it unreadable, your next best bet is to encrypt the file to make it unreadable. Your app could decrypt the contents, use it, and dispose of the decrypted version. Of course, this is still not bulletproof, since decryption requires a key which you must protect, but it's about as bulletproof as you're going to get.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With