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:

  1. is restore option via alert controller enough satisfy apple guideline?
  2. 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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -