MKStoreKit icon indicating copy to clipboard operation
MKStoreKit copied to clipboard

Wrong check for expired subscription

Open kittipongm opened this issue 7 years ago • 1 comments

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

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

kittipongm avatar Feb 22 '18 02:02 kittipongm

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

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

tommyz avatar Sep 16 '18 15:09 tommyz