I am using MKStoreKit to handle autorenewable subscriptions. I'm currently testing a 1 month subscription (in test a subscription lasts 5 minutes). After I purchase the subscription I wait for it to expire. Once it expires I check if the subscription is still active.
[[MKStoreManager sharedManager] isSubscriptionActive:kSubscriptionMonthlyIdentifier]
This returns false like I would expect. However, since it is auto-renewing, I would expect MKStoreKit at that point to contact Apple to revalidate the subscription. Maybe I'm using MKStoreKit wrong, but according to the docs and the blog post it should be as simple as:
//App Delegate
[MKStoreManager sharedManager];
//lets me know when the subscription was purchased
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(subscriptionPurchased:) name:kSubscriptionsPurchasedNotification object:nil];
//lets me know when the subscription expires
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(subscriptionFailed:) name:kSubscriptionsInvalidNotification object:nil];
//In a view with subscription feature
if([[MKStoreManager sharedManager] isSubscriptionActive:kSubscriptionMonthlyIdentifier]){
//access to subscription feature
}
//Where the user would purchase the subscription
[[MKStoreManager sharedManager] buyFeature:subscriptionId onComplete:^(NSString* purchasedFeature, NSData* receiptData)
{
...
}
onCancelled:^
{
...
}
My question is why, when the subscription is still active on Apple's end does MKStoreKit not let me know?