0

I want to gather anonymous information about my users music library. The information I want to gather is what is the count of rock songs, count of country, rap, jazz, etc etc. Again anonymously.

Lets say a user downloads the app and I have a method that checks if this the first time running. If so, then gather the info and send it to my Firebase console. If not then do nothing. But what if that user deletes the app and then re-downloads it. I don't want duplicate data. (I realize that a persons music library changes over time and I don't really have a good solution for that.)

How can I take the data from user A and assign that data that user and not re gather it whilst still keeping that user anonymous?

RubberDucky4444
  • 2,330
  • 5
  • 38
  • 70

1 Answers1

0

I see two variants here:

  • First to make a unique key for the user. Since you are gathering the anonymous data it could be something that cling to the user phone. Something like this.

  • Second is that you will save the bool flag that the app has collected the info not into user defaults, but to the keychain. Keychain doesn't clear after the app is removed, so you can check it if the app would be reinstalled.

Nike Kov
  • 12,630
  • 8
  • 75
  • 122