Confirm
" then sometimes its 开发者_如何学Pythonstate becomes SKPaymentTransactionStatePurchased
and sometimes it becomes SKPaymentTransactionStateRestored
. My problem is that I want to prevent user to use the app if he has not subscribed the app. For that I am trying to track the state of "SKPaymentTransaction
" so that I can allow or disallow the user to use the app. Such that, if the state is SKPaymentTransactionStatePurchased
, only then he could be able to use the app, but I don't understand how its state changes.
One more thing, When I tap on the "Settings
" to manage my Auto-Renewal, it shows me that my app will be expired on the current date i.e., today itself, but when I tapped on the "Confirm
" button to subscribe my app for one month then expiry date should be after one month. I don't understand how this whole process is working.
I have read whole documentation of Auto Renewal, but didn't get any help from that.
Please help!
Not sure about your first problem. In my case, I can never get SKPaymentTransactionStateRestored called at all. I am debugging why.
Meanwhile, I was facing the second problem you described. When I decoded the receipt, it looks like they keep the subscription valid for 5 mins. Sounds like a feature for testing in sandbox. At least that's what I am assuming.
精彩评论