Abdul Samad
Abdul Samad

Reputation: 5938

Getting to know if my app is updated from app store

I am going to publish a new version of my app on app store. I just want to know that if the app is being updated from the previous version or user has installed a fresh copy of the new version of my app. Based on this information i want to show some information to the updated users.

I was thinking of to keep a key in my NSUserDefaults of the previous_version but i haven't added any such key in the NSUserDefaults of my previous app version. So this key will be nil in both cases in my new version.

Is there a way i can get to know if the user has updated the app or installed a fresh copy of my app.

Upvotes: 0

Views: 71

Answers (1)

Apurv
Apurv

Reputation: 17186

There is no direct way for it. Indirectly you can check it. If you are moving your editable data into Documents directory in your previous version then at the time of launching new application, you can check if the file is present in document directory. If you can find it, the application is opened after update and if file is not present then it has been opened because of a fresh installation.

Upvotes: 1

Related Questions