Is there a way to update a modified plist file that's in the bundle through an iTunes app update?
I have an app that stores some data in a plist file in the form of an array & dictionaries. On some updates I have added to the plist file with more array items, but it seems that when the app is updated, the new plist file isn't copied/updated over unless the user deletes the app and re-installs it.
How do I get the app to update the local copy of the plist file with the new one?
The Info. plist file contains critical information about the configuration of an iOS mobile app—such as iOS versions that are supported and device compatibility—which the operating system uses to interact with the app. This file is automatically created when the mobile app is compiled.
To edit the contents of your information property list file, select the <project> -Info. plist file in your Xcode project to display the property list editor.
You can't update anything that's part of the bundle. Save the plist in the documents directory if you want to be able to update it.
NSArray *arrayPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *documentsDirectory = [arrayPaths objectAtIndex:0];
Files in the documents directory don't get deleted when updating an app using the store.
Versioned .plist files? E.g. MyApp-YYYYMMdd.plist
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