You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The date constraint found here: https://github.com/robotmedia/RMStore/blob/master/RMStore/Optional/RMAppReceipt.m#L389
outputs false if the purchase date of a renewable IAP lies after the date we are checking against. This seems like a reasonable assumption to make, but per the guidance here (which is good advice because I have seen this lapse in production):
@warning Auto-renewable subscription lapses are possible. If you are checking against the current date, you might want to deduct some time as tolerance.
we are subtracting a day from the current time and passing the resulting date into containsActiveAutoRenewableSubscription. The result is that the check is returning false on what should be an active subscription if the check is performed within 1 day (or whatever grace period is set) of purchasing.
I can submit a PR easily to fix this by dropping the first condition of the date comparison, but want to make sure there are no adverse effects that I am not considering. My proposed fix is to change this:
Greetings,
The date constraint found here:
https://github.com/robotmedia/RMStore/blob/master/RMStore/Optional/RMAppReceipt.m#L389
outputs false if the purchase date of a renewable IAP lies after the date we are checking against. This seems like a reasonable assumption to make, but per the guidance here (which is good advice because I have seen this lapse in production):
we are subtracting a day from the current time and passing the resulting date into containsActiveAutoRenewableSubscription. The result is that the check is returning false on what should be an active subscription if the check is performed within 1 day (or whatever grace period is set) of purchasing.
I can submit a PR easily to fix this by dropping the first condition of the date comparison, but want to make sure there are no adverse effects that I am not considering. My proposed fix is to change this:
return [self.purchaseDate compare:date] != NSOrderedDescending && [date compare:self.subscriptionExpirationDate] != NSOrderedDescending;
to this:
return [date compare:self.subscriptionExpirationDate] != NSOrderedDescending;
Thanks for the hard work on RMStore!
Lou
The text was updated successfully, but these errors were encountered: