瀏覽代碼

Omit optional validUntil parameter on ViewController

Andrea Bizzotto 7 年之前
父節點
當前提交
f19dcaba33
共有 2 個文件被更改,包括 6 次插入14 次删除
  1. 3 8
      SwiftyStoreKit-iOS-Demo/ViewController.swift
  2. 3 6
      SwiftyStoreKit-macOS-Demo/ViewController.swift

+ 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))
                 }