I am using MKStoreKit 6.1 I am trying to check the active subscription, here is the code:
- (BOOL) userHaveActiveSubscribe {
NSArray *myProductIds = @[oneMonthSubscribe, oneYearSubscribe, sixMonthSubscribe];
for (NSString *productId in myProductIds) {
if([[MKStoreKit sharedKit] isProductPurchased:productId]) {
if ([[MKStoreKit sharedKit] expiryDateForProduct:productId]) {
if([[NSDate date] compare:[[MKStoreKit sharedKit] expiryDateForProduct:productId]] == NSOrderedAscending) {
NSLog(@"USER HAVE ACTIVE SUBSCRIBE (%@)",productId);
return YES;
}
}
}
}
return NO;
}
But I'm very worried that it might not work. I would not like to give users access if the subscription has expired, so I would not want to restrict access to them if the subscription is active.