Paul de Lange
Paul de Lange

Reputation: 10633

Subscription Expiry Date if user changes dates

Our app uses Non-Renewable Subscriptions to provide access to content for one year. The subscription receipt is stored on iCloud (when available) and in the device keychain. There is also a WS that is called on occasion to validate the receipt but does not record the transaction.

Our problem is if the users change their clock backwards (say set the date to 2010), our subscription does not expire after one year but now three years (2013-2010).

Our solution was to say that subscriptions with a duration of more than one year are fraudulent and the receipt is cleared and life goes on.

However, my boss now is complaining about users that set the clock to six months in the past (less than one year so ok, but the subscription lasts for 1.5 years instead of the valid one year).

Is there a better way to be dealing with device clock tampering or is it something we have to live with (as I believe)?

Upvotes: 4

Views: 170

Answers (2)

lnafziger
lnafziger

Reputation: 25740

As I said in my comment above, I would check the time with a trusted server instead of using the local time. Just as important, once a receipt expires, immediately delete it or mark it as expired so that they can't turn off network access and roll back the time in order to use it.

Upvotes: 0

Frhay
Frhay

Reputation: 424

If your app gets content from a server then you could store a list of "device-identifiers" combined with an expiration date.

Being on your server the client-time will have no voice on when the subscription is expired or not.

Upvotes: 1

Related Questions