In code (in method -paymentQueue...) if found your comments -
// non-consumable or subscriptions
// subscriptions will eventually contain the expiry date after the receipt is validated during the next run
self.purchaseRecord[transaction.payment.productIdentifier] = [NSNull null];
ok. But when you validate receipt you write this:
NSNumber expiresDateMs = receiptDictionary[@"expires_date_ms"];
NSNumber previouslyStoredExpiresDateMs = self.purchaseRecord[productIdentifier];
if (expiresDateMs && ![expiresDateMs isKindOfClass:[NSNull class]] && ![previouslyStoredExpiresDateMs isKindOfClass:[NSNull class]]) {
if ([expiresDateMs doubleValue] > [previouslyStoredExpiresDateMs doubleValue]) {
self.purchaseRecord[productIdentifier] = expiresDateMs;
purchaseRecordDirty = YES;
}
}
There is only one place where you set in purchaseRecord expires date. But how could old value be not null? this is the bug ?
In code (in method -paymentQueue...) if found your comments - // non-consumable or subscriptions // subscriptions will eventually contain the expiry date after the receipt is validated during the next run self.purchaseRecord[transaction.payment.productIdentifier] = [NSNull null];
ok. But when you validate receipt you write this: NSNumber expiresDateMs = receiptDictionary[@"expires_date_ms"]; NSNumber previouslyStoredExpiresDateMs = self.purchaseRecord[productIdentifier]; if (expiresDateMs && ![expiresDateMs isKindOfClass:[NSNull class]] && ![previouslyStoredExpiresDateMs isKindOfClass:[NSNull class]]) { if ([expiresDateMs doubleValue] > [previouslyStoredExpiresDateMs doubleValue]) { self.purchaseRecord[productIdentifier] = expiresDateMs; purchaseRecordDirty = YES; } }
There is only one place where you set in purchaseRecord expires date. But how could old value be not null? this is the bug ?