1

I need a way to detect if user install the app from fresh, or after update.
The catch here is that version 1 of my app is already on the App Store, so I cant rely on any user default flag.
I'm now working on version 2, and I want to detect on app launch, if version 1 was installed or not.
any ideas?

Mario
  • 2,431
  • 6
  • 27
  • 34
  • this is possible if somthing is doing in your version 1 – BHASKAR Aug 18 '14 at 09:20
  • 1
    What are you trying to achieve? What about people having downloaded V1, deleted, and now installed V2? – Eiko Aug 18 '14 at 09:38
  • @Eiko thats fine, it still consider a fresh install of version 2, because no other previous version were installed at the moment version 2 is installed – Mario Aug 18 '14 at 12:15
  • 1
    Possible duplicate of [Is there any way to check a app was installed or updated?](http://stackoverflow.com/questions/22173269/is-there-any-way-to-check-a-app-was-installed-or-updated) – nburk Oct 04 '15 at 00:19
  • there's a reasonable solution posted [here](http://stackoverflow.com/questions/22173269/is-there-any-way-to-check-a-app-was-installed-or-updated), voting to close this question because it's a duplicate and the other post has a more helpful answer – nburk Oct 04 '15 at 00:20

1 Answers1

3

If you didn't make the provisions (app defaults etc), there is no other standard/default way of knowing if a previous version was installed .

However, you can still find a way to detect if previous version was installed based on whether in previous version you

  1. created a folder/file in app documents/cache directory or
  2. created an SQLite db or
  3. sent the UUID to a a server or
  4. any other code/feature which can be checked with an 'if exists' code on app launch

If you can't.. there is no other way.

Swapnil Luktuke
  • 10,385
  • 2
  • 35
  • 58