Does anyone know of a way to get the previous app version after app update? We actually missed to store that information somewhere and I need to get the previous app version somehow. I am not sure if it is in possible, any help would be appreciated. thank you
Share
That is not possible because once the new application has been installed, any trace of the previous application binary is replaced by the new binary.
So the only way to do this is to store the current version in a key of your
NSUserDefaults:NSUserDefaultsis different from the current versionNSUserDefaultskey. In that case after retrieving it, replace the old version value with the current version in theNSUserDefaultsfor the next launches.(The current version of the application can be obtained using
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]for example)But as far as you didn’t store the information in your
NSUserDefaultsin your previous version, it is not possible to check that if you didn’t implement this kind of system yourself.