开发者

AppStore Subscriptions - Question

I have read in the Apple Documentation that StoreKit will not restore subscriptions on its own. I need to handle this myself instead by storing the transaction data on my server. That's fine, but am I allowed to associate this receipt with one UDID only (the one that bought it) or w开发者_开发知识库ill this get me rejected?

If this isn't the right way to go, how would I approach this to support multiple devices? (since they don't have the same UDID)


If a subscription is autorenewed, the transaction won't pass the paymentQueue:updateTransactions method. The renew just happens on the Store. If you want to test for it you have to either:

  • Revalidate the receipt on your application server, if you store the receipt there.

  • Revalidate the receipt on ur iOS client

(http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/VerifyingStoreReceipts/VerifyingStoreReceipts.html#//apple_ref/doc/uid/TP40008267-CH104-SW1)

In order to avoid testing for an autorenew each launch/activation you should store the endDate of the subscription period to test for a renew afterwards.

Also see:

http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/RenewableSubscriptions/RenewableSubscriptions.html#//apple_ref/doc/uid/TP40008267-CH4-SW4

With the restoreTransactions method you get all transactions for the logged in Aplle-ID. Search for the transaction which is associated with your product and verify the receipt for possible renews. If no transaction could be found, the user has not purchased on any device.

However, there seems to be a bug in the sandbox. Subscriptions sometimes get renewed, sometimes not. Hard to test....


You don't have to store transaction data on your server. You can initiate a restore previous purchases transaction with -[SKPaymentQueue restoreCompletedTransactions].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜