Skip to content

Commit

Permalink
Fix watch build on xcode 12.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuky committed Aug 5, 2021
1 parent a667283 commit a06e306
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftyStoreKit/InAppProductQueryRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import StoreKit

typealias InAppProductRequestCallback = (RetrieveResults) -> Void

public protocol InAppRequest: class {
public protocol InAppRequest: AnyObject {
func start()
func cancel()
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/SwiftyStoreKit/PaymentQueueController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum TransactionResult {
case failed(error: SKError)
}

public protocol PaymentQueue: class {
public protocol PaymentQueue: AnyObject {

func add(_ observer: SKPaymentTransactionObserver)
func remove(_ observer: SKPaymentTransactionObserver)
Expand Down Expand Up @@ -273,9 +273,9 @@ class PaymentQueueController: NSObject, SKPaymentTransactionObserver {
updatedDownloadsHandler?(downloads)
}

// #if os(iOS) && !targetEnvironment(macCatalyst)
#if !os(watchOS)
func paymentQueue(_ queue: SKPaymentQueue, shouldAddStorePayment payment: SKPayment, for product: SKProduct) -> Bool {
return shouldAddStorePaymentHandler?(payment, product) ?? false
}
// #endif
#endif
}
2 changes: 1 addition & 1 deletion Sources/SwiftyStoreKit/ProductsInfoController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import Foundation
import StoreKit

protocol InAppProductRequestBuilder: class {
protocol InAppProductRequestBuilder: AnyObject {
func request(productIds: Set<String>, callback: @escaping InAppProductRequestCallback) -> InAppProductRequest
}

Expand Down

0 comments on commit a06e306

Please sign in to comment.