Swift 如何使用Parse恢复应用内购买?

Swift 如何使用Parse恢复应用内购买?,swift,parse-platform,in-app-purchase,Swift,Parse Platform,In App Purchase,我想创建一个“应用程序内恢复”按钮,因为苹果需要它。我正在为我的iAP产品使用Parse,我使用了以下代码: PFPurchase.buyProduct("iapbanner", block: { (error:NSError!) -> Void in if error != nil { let alert = UIAlertController(title: "Errore", message: error?.localizedDe

我想创建一个“应用程序内恢复”按钮,因为苹果需要它。我正在为我的iAP产品使用Parse,我使用了以下代码:

PFPurchase.buyProduct("iapbanner", block: { (error:NSError!) -> Void in
            if error != nil {
                let alert = UIAlertController(title: "Errore", message: error?.localizedDescription, preferredStyle: UIAlertControllerStyle.Alert)
                alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: nil))
                self.presentViewController(alert, animated: true, completion: nil)
            } else {
                self.opzioniTableView.reloadData()
            }
        })

这个很好用。不过,在Parse的文档中没有提到如何恢复iAp,所以我在问您。

使用
PFPurchase.restore()
使用Parse恢复购买。我不知道为什么他们的文件里没有这个