Restore button for iOS non-consumable in-app purchase

后端 未结 4 1676
梦如初夏
梦如初夏 2020-12-05 15:38

Apple have unfortunately rejected my app for not having a restore button. I wanted to have a seamless experience for the user but there are some problems.

-         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 16:22

    Apple rejects application with In App Purchase, that does not have a restore purchase button. In the app view, add a restore button. Then in the In App Purchase helper class, add the following method:

    - (void)restoreCompletedTransactions {
        [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; 
    }
    

    Now call this method from the button click action and it will restore the previous purchase.

提交回复
热议问题