AmaltasCoder
AmaltasCoder

Reputation: 1123

How to check the app version that was originally installed by the user in iOS

I have an iOS app which originally had a version 1.0. I then released updated version 2.0.

Is it somehow possible in 3.0 update to check when a user originally installed the app in 1.0, or 2.0, or in 3.0?

I don't want to use preferences because that will not work in case of user deleting the app and then installing.

Upvotes: 4

Views: 645

Answers (1)

Lou Franco
Lou Franco

Reputation: 89232

Only if 1.0 or 2.0 left something behind for 3.0 to check (a setting, database record, file in your sandbox). If you want it to survive a delete and reinstall, then that something needs to not be on the phone (it would have had to register with an external service).

It's too late if the code isn't in your 1.0 or 2.0 versions -- you will probably need to ask the user.

If you are using a database via CoreData, and you have different versions in 1.0 and 2.0, you can check that before you upgrade it for 3.0. Even if you aren't using CoreData, there might be schema differences you can check for.

Upvotes: 6

Related Questions