Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix watch build on xcode 12.5 #645

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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