I want to determine the number of days a user has used an iOS app. I want to trigger an amplitude event the first to fourth days but not after the fourth day he uses it. How can I track how many days the user used the app?
I want to determine the number of days a user has used an iOS app. I want to trigger an amplitude event the first to fourth days but not after the fourth day he uses it. How can I track how many days the user used the app?
2
Answers
One approach is using UserDefaults to count how many times users open the app:
then check the number in sceneDelegate or appDelegate, and update it:
Store the needed data in UserDefaults and call it when you need to do the calculation.