I had this question a while back too.
- MKStoreKit is not an ideal solution now because it doesn't support iOS7 and the new App Receipt system.
2-3. Apple documentation explains that they renew the receipt in the 24h prior to expiration, and then:
After a subscription is successfully renewed, Store Kit adds a transaction for the renewal to the transaction queue. Your app checks the transaction queue on launch and handles the renewal the same way as any other transaction. Note that if your app is already running when the subscription renews, the transaction observer is not called; your app finds out about the renewal the next time it’s launched.
Your app "checks the transaction queue on launch" and you need to set a SKPaymentTransactionObserver
via
[[SKPaymentQueue defaultQueue] addTransactionObserver:yourTransactionObserver];
to handle:
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
just like you would when you first subscribe.
While testing, you could try to force close your app and then re-launch it after it expires to see if it successfully renews on launch. Alternatively, you can re-verify the receipt you saved from the original subscription. The verification server returns a new receipt if a renewal occurred, and then you can get the most recent expiration date from that.
I've put my autorenewable subscription implementation on github if you want to check it out. RMStore is another library that supports iOS7 and works for other types of purchases too.