Browse Source

Fix macOS compile error

Fixes `Cannot override 'paymentQueue' which has been marked unavailable` error.
Jonathan Downing 7 years ago
parent
commit
420b004e5a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      SwiftyStoreKit/PaymentQueueController.swift

+ 2 - 0
SwiftyStoreKit/PaymentQueueController.swift

@@ -239,8 +239,10 @@ class PaymentQueueController: NSObject, SKPaymentTransactionObserver {
         updatedDownloadsHandler?(downloads)
     }
 
+    #if os(iOS)
     func paymentQueue(_ queue: SKPaymentQueue, shouldAddStorePayment payment: SKPayment, for product: SKProduct) -> Bool {
         
         return shouldAddStorePaymentHandler?(payment, product) ?? false
     }
+    #endif
 }