I need to do something only after when the application update from appstore. I do it with NSUserDefaults but it's not good for me because it works only after the first update.
help
thanks
The MTMigration project (MIT license) does exactly what you want:
Manages blocks of code that only need to run once on version updates in iOS apps. This could be anything from data normalization routines, "What's New In This Version" screens, or bug fixes.
An example of its use:
[MTMigration migrateToVersion:@"0.9" block:^{
// Some 0.9 stuff
}];
[MTMigration migrateToVersion:@"1.0" block:^{
// Some 1.0 stuff
}];
if ([[NSString stringWithFormat:@"Version %@",[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]]isEqualToString:@"Version 1.0"])
{
// run your code here
}
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