ios - Parse In App Purchase Restore Functionality -
my app reject apple not having restore fucntion in-app-purchasing.
i using parse implementation here allows restoring purchases if user has made previous purchase means of alert controller restore option displayed when user selects purchase button.
so have 2 questions:
- is restore option via alert controller enough satisfy apple guideline?
- if not, there function in parse in app purchase api allows restoring click of button? not find 1 in docs.
thansk in advance
hidden in depths of documentation is:
pfpurchase.restore();
which executes block in observer if purchase has been made -
pfpurchase.addobserverforproduct("purchases.cases", block: { (transaction : skpaymenttransaction!) -> void in //set boolean user defaults when in app p[urcahse made, access agian in tablevoew relase cases let userdefaults = nsuserdefaults.standarduserdefaults(); userdefaults.setbool(true, forkey: "inapppurchasemade"); userdefaults.synchronize(); }) return true }
Comments
Post a Comment