Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Wrong check for expired subscription #270

Open
kittipongm opened this issue Feb 22, 2018 · 1 comment
Open

Wrong check for expired subscription #270

kittipongm opened this issue Feb 22, 2018 · 1 comment

Comments

@kittipongm
Copy link

On line: if ([[NSDate date] timeIntervalSince1970] > [expiresDateMs doubleValue]) {

The expiresDateMs is milliseconds but the first one is in seconds.

@tommyz
Copy link

tommyz commented Sep 16, 2018

Try to write this.
if ([[NSDate date] timeIntervalSince1970] > ([expiresDateMs doubleValue] / 1000.0f) ) {

        [[NSNotificationCenter defaultCenter] postNotificationName:kMKStoreKitSubscriptionExpiredNotification object:productIdentifier];
      }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants