From c98e90b518eef4e0728126115ef4973e33c110c9 Mon Sep 17 00:00:00 2001 From: Ivan <6350992+bivant@users.noreply.github.com> Date: Thu, 19 May 2022 22:58:00 +0300 Subject: [PATCH] Fix demo compilation error after b3f2601196a87569d463283c3a582ddcc7fccf0b - Merge pull request #652 from azouts/master Communicate deferred transactions to the app --- SwiftyStoreKit-iOS-Demo/ViewController.swift | 2 ++ SwiftyStoreKit-macOS-Demo/ViewController.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/SwiftyStoreKit-iOS-Demo/ViewController.swift b/SwiftyStoreKit-iOS-Demo/ViewController.swift index fa640325..a690403a 100644 --- a/SwiftyStoreKit-iOS-Demo/ViewController.swift +++ b/SwiftyStoreKit-iOS-Demo/ViewController.swift @@ -279,6 +279,8 @@ extension ViewController { case .success(let purchase): print("Purchase Success: \(purchase.productId)") return nil + case .deferred(purchase: _): + return alertWithTitle("Purchase deferred", message: "The purchase deferred") case .error(let error): print("Purchase Failed: \(error)") switch error.code { diff --git a/SwiftyStoreKit-macOS-Demo/ViewController.swift b/SwiftyStoreKit-macOS-Demo/ViewController.swift index 071c6d9f..d0eaf729 100644 --- a/SwiftyStoreKit-macOS-Demo/ViewController.swift +++ b/SwiftyStoreKit-macOS-Demo/ViewController.swift @@ -193,6 +193,8 @@ extension ViewController { case .success(let purchase): print("Purchase Success: \(purchase.productId)") return alertWithTitle("Thank You", message: "Purchase completed") + case .deferred(purchase: _): + return alertWithTitle("Purchase deferred", message: "The purchase deferred") case .error(let error): print("Purchase Failed: \(error)") switch error.code {