I’m developing an app with a feature (that involves a request to the backend) that I would like to allow all new users 10 free uses of. After those 10 uses are used, the user would need to subscribe to a monthly subscription that confers unlimited usage.
I’ve tried implementing this by keeping track of this on the backend based on the app user id, but it appears that while I can validate whether a given app user id has subscribed to a paid plan, there is no way to prevent the client from faking an app user id (i.e. by reinstalling the app or by directly talking to the backend API with randomly generated app user ids) to seem like a new user and replenishing their 10 uses. Is there a way to get a stable (anonymized?) app store ID that persists across re-installs?
Another approach I’ve considered is making the 10 uses opt-in by requiring the user to start a free trial--but from my research it appears that on the App Store trials can only be time-limited? I’m not sure how I’d implement 10 lifetime free uses (i.e. the trial never expires if the uses are never used), and after the uses are all used require them to upgrade to a paid subscription.