Bläddra i källkod

Omit optional validUntil parameter on ViewController

Andrea Bizzotto 7 år sedan
förälder
incheckning
f19dcaba33

+ 3 - 8
SwiftyStoreKit-iOS-Demo/ViewController.swift

@@ -189,23 +189,18 @@ class ViewController: UIViewController {
                     let purchaseResult = SwiftyStoreKit.verifySubscription(
                         ofType: .autoRenewable,
                         productId: productId,
-                        inReceipt: receipt,
-                        validUntil: Date()
-                    )
+                        inReceipt: receipt)
                     self.showAlert(self.alertForVerifySubscriptions(purchaseResult, productIds: [productId]))
                 case .nonRenewingPurchase:
                     let purchaseResult = SwiftyStoreKit.verifySubscription(
                         ofType: .nonRenewing(validDuration: 60),
                         productId: productId,
-                        inReceipt: receipt,
-                        validUntil: Date()
-                    )
+                        inReceipt: receipt)
                     self.showAlert(self.alertForVerifySubscriptions(purchaseResult, productIds: [productId]))
                 default:
                     let purchaseResult = SwiftyStoreKit.verifyPurchase(
                         productId: productId,
-                        inReceipt: receipt
-                    )
+                        inReceipt: receipt)
                     self.showAlert(self.alertForVerifyPurchase(purchaseResult, productId: productId))
                 }
 

+ 3 - 6
SwiftyStoreKit-macOS-Demo/ViewController.swift

@@ -130,21 +130,18 @@ class ViewController: NSViewController {
                     let purchaseResult = SwiftyStoreKit.verifySubscription(
                         ofType: .autoRenewable,
                         productId: productId,
-                        inReceipt: receipt
-                    )
+                        inReceipt: receipt)
                     self.showAlert(self.alertForVerifySubscription(purchaseResult))
                 case .nonRenewingPurchase:
                     let purchaseResult = SwiftyStoreKit.verifySubscription(
                         ofType: .nonRenewing(validDuration: 60),
                         productId: productId,
-                        inReceipt: receipt
-                    )
+                        inReceipt: receipt)
                     self.showAlert(self.alertForVerifySubscription(purchaseResult))
                 default:
                     let purchaseResult = SwiftyStoreKit.verifyPurchase(
                         productId: productId,
-                        inReceipt: receipt
-                    )
+                        inReceipt: receipt)
                     self.showAlert(self.alertForVerifyPurchase(purchaseResult))
                 }