我正在使用MKStoreKit來處理自動更新訂閱。我目前正在測試一個月的訂閱(測試訂閱持續5分鐘)。我購買訂閱後,我等待它過期。一旦到期,我會檢查訂閱是否仍然有效。MKStoreKit自動更新訂閱
[[MKStoreManager sharedManager] isSubscriptionActive:kSubscriptionMonthlyIdentifier]
這會返回假像我所期望的。但是,由於它是自動更新的,因此我期望MKStoreKit可以聯繫Apple重新驗證訂閱。也許我使用MKStoreKit錯,但根據docs和blog post它應該是這麼簡單:
//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:^
{
...
}
我的問題是爲什麼,當訂閱仍然活躍在蘋果的結束也MKStoreKit不讓我知道?