Build Information
Failed to build InAppMaster, reference 1.0.1 (825ce1), with Swift 6.1 for macOS (SPM) on 30 Oct 2026 03:08:09 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/moslienko/InAppMaster.git
Reference: 1.0.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/moslienko/InAppMaster
* tag 1.0.1 -> FETCH_HEAD
HEAD is now at 825ce16 Merge pull request #2 from moslienko/develop
Cloned https://github.com/moslienko/InAppMaster.git
Revision (git rev-parse @):
825ce16352c28f3449218317b0dd6cc276327242
SUCCESS checkout https://github.com/moslienko/InAppMaster.git at 1.0.1
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/moslienko/InAppMaster.git
https://github.com/moslienko/InAppMaster.git
{
"dependencies" : [
],
"manifest_display_name" : "InAppMaster",
"name" : "InAppMaster",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
}
],
"products" : [
{
"name" : "InAppMaster",
"targets" : [
"InAppMaster"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "InAppMaster",
"module_type" : "SwiftTarget",
"name" : "InAppMaster",
"path" : "Sources/InAppMaster",
"product_memberships" : [
"InAppMaster"
],
"sources" : [
"Data/InAppProductProtocol.swift",
"Data/InAppStoreKitError.swift",
"Extensions/Product+InAppProductProtocol.swift",
"Extensions/SKProduct+InAppProductProtocol.swift",
"Services/InAppLegacyService.swift",
"Services/InAppModernService.swift",
"Services/InAppRefreshReceiptService.swift",
"Services/InAppService.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/11] Emitting module InAppMaster
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Data/InAppProductProtocol.swift:20:21: error: 'Product' is only available in macOS 12.0 or newer
9 | import StoreKit
10 |
11 | public protocol InAppProductProtocol {
| `- note: add @available attribute to enclosing protocol
12 | var id: String { get }
13 | var title: String { get }
:
18 | var rawSKProduct: SKProduct? { get }
19 | @available(iOS 15.0, *)
20 | var rawProduct: Product? { get }
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
21 | }
22 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:34:28: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
:
32 |
33 | @available(iOS 15.0, *)
34 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
35 | self
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:11:11: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/SKProduct+InAppProductProtocol.swift:39:28: error: 'Product' is only available in macOS 12.0 or newer
8 | import StoreKit
9 |
10 | extension SKProduct: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
11 | public var id: String {
12 | self.productIdentifier
:
37 |
38 | @available(iOS 15.0, *)
39 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
40 | nil
41 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:14:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppLegacyService' may have shared mutable state; this is an error in the Swift 6 language mode
9 |
10 | /// StoreKit 1 (iOS 13-14)
11 | final class InAppLegacyService: NSObject {
| `- note: class 'InAppLegacyService' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - Params
14 | static let shared = InAppLegacyService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppLegacyService' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | private var productsRequest = SKProductsRequest()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:18:32: error: 'Product' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
16 | static let shared = InAppModernService()
17 |
18 | private var iapProducts = [Product]()
| `- error: 'Product' is only available in macOS 12.0 or newer
19 | private var updatesTask: Task<Void, Never>?
20 | private var finishedTransactionIDs = Set<UInt64>()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:19:30: error: 'Task' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
17 |
18 | private var iapProducts = [Product]()
19 | private var updatesTask: Task<Void, Never>?
| `- error: 'Task' is only available in macOS 10.15 or newer
20 | private var finishedTransactionIDs = Set<UInt64>()
21 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:126:61: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:147:38: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
:
145 | /// Adds the products to the cache without removing already loaded ones.
146 | /// - Parameter products: The products to be added.
147 | func mergeIntoCache(_ products: [Product]) {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
148 | for product in products {
149 | if let index = iapProducts.firstIndex(where: { $0.id == product.id }) {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:14:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppRefreshReceiptService' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: class 'InAppRefreshReceiptService' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - Params
14 | static public let shared = InAppRefreshReceiptService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppRefreshReceiptService' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | private var receiptRefreshContinuation: CheckedContinuation<Void, Error>?
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:16:45: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
14 | static public let shared = InAppRefreshReceiptService()
15 |
16 | private var receiptRefreshContinuation: CheckedContinuation<Void, Error>?
| `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
17 | private var receiptRefreshRequest: SKReceiptRefreshRequest?
18 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppService' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: class 'InAppService' does not conform to the 'Sendable' protocol
11 |
12 | // MARK: - Params
13 | static public let shared = InAppService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppService' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | private var configuredProductIdentifiers: [String] = []
15 |
[4/11] Compiling InAppMaster InAppStoreKitError.swift
[5/11] Compiling InAppMaster InAppRefreshReceiptService.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:14:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppRefreshReceiptService' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: class 'InAppRefreshReceiptService' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - Params
14 | static public let shared = InAppRefreshReceiptService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppRefreshReceiptService' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | private var receiptRefreshContinuation: CheckedContinuation<Void, Error>?
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:16:45: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
14 | static public let shared = InAppRefreshReceiptService()
15 |
16 | private var receiptRefreshContinuation: CheckedContinuation<Void, Error>?
| `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
17 | private var receiptRefreshRequest: SKReceiptRefreshRequest?
18 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:30:26: error: 'withCheckedThrowingContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
:
23 |
24 | /// Refreshes the App Store receipt.
25 | public func refreshReceipt() async throws {
| `- note: add @available attribute to enclosing instance method
26 | if receiptRefreshContinuation != nil {
27 | throw InAppStoreKitError.pending
28 | }
29 |
30 | return try await withCheckedThrowingContinuation { continuation in
| |- error: 'withCheckedThrowingContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
31 | self.receiptRefreshContinuation = continuation
32 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:30:59: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:30:58: note: expanded code originates here
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
:
23 |
24 | /// Refreshes the App Store receipt.
25 | public func refreshReceipt() async throws {
| `- note: add @available attribute to enclosing instance method
26 | if receiptRefreshContinuation != nil {
27 | throw InAppStoreKitError.pending
28 | }
29 |
30 | return try await withCheckedThrowingContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift
|28 |
|29 |
|30 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+-------------------------------------------------------------------------------------------------------------
31 | self.receiptRefreshContinuation = continuation
32 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:47:37: error: 'resume()' is only available in macOS 10.15 or newer
40 |
41 | // MARK: - SKRequestDelegate
42 | extension InAppRefreshReceiptService: SKRequestDelegate {
| `- note: add @available attribute to enclosing extension
43 |
44 | /// Called when the receipt refresh request finishes successfully.
45 | /// - Parameter request: The request that finished.
46 | public func requestDidFinish(_ request: SKRequest) {
| `- note: add @available attribute to enclosing instance method
47 | receiptRefreshContinuation?.resume()
| |- error: 'resume()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | receiptRefreshContinuation = nil
49 | receiptRefreshRequest = nil
[6/11] Compiling InAppMaster InAppService.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:13:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppService' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: class 'InAppService' does not conform to the 'Sendable' protocol
11 |
12 | // MARK: - Params
13 | static public let shared = InAppService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppService' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | private var configuredProductIdentifiers: [String] = []
15 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:47:13: error: 'Task' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
46 | if #available(iOS 15.0, *) {
47 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | do {
49 | let products = try await modernService.fetchAvailableProducts(
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:47:13: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
46 | if #available(iOS 15.0, *) {
47 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | do {
49 | let products = try await modernService.fetchAvailableProducts(
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:52:27: error: 'MainActor' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
50 | productIdentifiers: self.configuredProductIdentifiers
51 | )
52 | await MainActor.run {
| |- error: 'MainActor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | completion(.success(products))
54 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:52:37: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
50 | productIdentifiers: self.configuredProductIdentifiers
51 | )
52 | await MainActor.run {
| |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | completion(.success(products))
54 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:56:27: error: 'MainActor' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
54 | }
55 | } catch {
56 | await MainActor.run {
| |- error: 'MainActor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | completion(.failure(error))
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:56:37: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
54 | }
55 | } catch {
56 | await MainActor.run {
| |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | completion(.failure(error))
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:49:60: warning: non-sendable result type '[any InAppProductProtocol]' cannot be sent from main actor-isolated context in call to instance method 'fetchAvailableProducts(productIdentifiers:)'; this is an error in the Swift 6 language mode
47 | Task {
48 | do {
49 | let products = try await modernService.fetchAvailableProducts(
| `- warning: non-sendable result type '[any InAppProductProtocol]' cannot be sent from main actor-isolated context in call to instance method 'fetchAvailableProducts(productIdentifiers:)'; this is an error in the Swift 6 language mode
50 | productIdentifiers: self.configuredProductIdentifiers
51 | )
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Data/InAppProductProtocol.swift:11:17: note: protocol 'InAppProductProtocol' does not conform to the 'Sendable' protocol
9 | import StoreKit
10 |
11 | public protocol InAppProductProtocol {
| `- note: protocol 'InAppProductProtocol' does not conform to the 'Sendable' protocol
12 | var id: String { get }
13 | var title: String { get }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:49:46: warning: non-sendable type 'InAppService' cannot be sent into main actor-isolated context in call to property 'modernService'; this is an error in the Swift 6 language mode
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: class 'InAppService' does not conform to the 'Sendable' protocol
11 |
12 | // MARK: - Params
:
47 | Task {
48 | do {
49 | let products = try await modernService.fetchAvailableProducts(
| `- warning: non-sendable type 'InAppService' cannot be sent into main actor-isolated context in call to property 'modernService'; this is an error in the Swift 6 language mode
50 | productIdentifiers: self.configuredProductIdentifiers
51 | )
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:78:13: error: 'Task' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
74 | /// - id: The identifier of the product.
75 | /// - completion: A closure called with the result containing the purchased on success, or an error on failure.
76 | public func purchaseProduct(id: String, completion: @escaping (Result<String, Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
77 | if #available(iOS 15.0, *) {
78 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
79 | do {
80 | try await modernService.purchaseMyProduct(id: id)
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:78:13: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
74 | /// - id: The identifier of the product.
75 | /// - completion: A closure called with the result containing the purchased on success, or an error on failure.
76 | public func purchaseProduct(id: String, completion: @escaping (Result<String, Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
77 | if #available(iOS 15.0, *) {
78 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
79 | do {
80 | try await modernService.purchaseMyProduct(id: id)
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:80:31: warning: non-sendable type 'InAppService' cannot be sent into main actor-isolated context in call to property 'modernService'; this is an error in the Swift 6 language mode
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: class 'InAppService' does not conform to the 'Sendable' protocol
11 |
12 | // MARK: - Params
:
78 | Task {
79 | do {
80 | try await modernService.purchaseMyProduct(id: id)
| `- warning: non-sendable type 'InAppService' cannot be sent into main actor-isolated context in call to property 'modernService'; this is an error in the Swift 6 language mode
81 | completion(.success(id))
82 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:105:13: error: 'Task' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
101 | /// Restores previously purchased.
102 | /// - Parameter completion: A closure called with the result containing the identifiers of the restored products on success, or an error on failure.
103 | public func restoreProducts(completion: @escaping (Result<[String], Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
104 | if #available(iOS 15.0, *) {
105 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | do {
107 | let purchasedProducts = try await modernService.restorePurchase()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:105:13: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
101 | /// Restores previously purchased.
102 | /// - Parameter completion: A closure called with the result containing the identifiers of the restored products on success, or an error on failure.
103 | public func restoreProducts(completion: @escaping (Result<[String], Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
104 | if #available(iOS 15.0, *) {
105 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | do {
107 | let purchasedProducts = try await modernService.restorePurchase()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:107:55: warning: non-sendable type 'InAppService' cannot be sent into main actor-isolated context in call to property 'modernService'; this is an error in the Swift 6 language mode
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: class 'InAppService' does not conform to the 'Sendable' protocol
11 |
12 | // MARK: - Params
:
105 | Task {
106 | do {
107 | let purchasedProducts = try await modernService.restorePurchase()
| `- warning: non-sendable type 'InAppService' cannot be sent into main actor-isolated context in call to property 'modernService'; this is an error in the Swift 6 language mode
108 | completion(.success(Array(purchasedProducts)))
109 | } catch {
[7/11] Compiling InAppMaster InAppProductProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Data/InAppProductProtocol.swift:20:21: error: 'Product' is only available in macOS 12.0 or newer
9 | import StoreKit
10 |
11 | public protocol InAppProductProtocol {
| `- note: add @available attribute to enclosing protocol
12 | var id: String { get }
13 | var title: String { get }
:
18 | var rawSKProduct: SKProduct? { get }
19 | @available(iOS 15.0, *)
20 | var rawProduct: Product? { get }
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
21 | }
22 |
[8/11] Compiling InAppMaster InAppLegacyService.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:14:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppLegacyService' may have shared mutable state; this is an error in the Swift 6 language mode
9 |
10 | /// StoreKit 1 (iOS 13-14)
11 | final class InAppLegacyService: NSObject {
| `- note: class 'InAppLegacyService' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - Params
14 | static let shared = InAppLegacyService()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InAppLegacyService' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 |
16 | private var productsRequest = SKProductsRequest()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:74:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
72 | guard canMakePurchases() else {
73 | DispatchQueue.main.async {
74 | self.productDidFailedPurchased?(InAppStoreKitError.userCantMakePayments)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
75 | }
76 | return
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:68:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
66 | guard !isPurchaseInProgress else {
67 | DispatchQueue.main.async {
68 | self.productDidFailedPurchased?(InAppStoreKitError.pending)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
69 | }
70 | return
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:96:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
94 | guard canMakePurchases() else {
95 | DispatchQueue.main.async {
96 | self.productDidFailedRestored?(InAppStoreKitError.userCantMakePayments)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
97 | }
98 | return
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:90:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
88 | guard !isRestoreInProgress else {
89 | DispatchQueue.main.async {
90 | self.productDidFailedRestored?(InAppStoreKitError.pending)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
91 | }
92 | return
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:284:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
282 | isPurchaseInProgress = false
283 | DispatchQueue.main.async {
284 | self.productDidFailedPurchased?(InAppStoreKitError.unknownProductId)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
285 | }
286 | return
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:277:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
275 | isPurchaseInProgress = false
276 | DispatchQueue.main.async {
277 | self.productDidFailedPurchased?(InAppStoreKitError.productsNotFetched)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
278 | }
279 | return
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:131:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
129 | if response.products.isEmpty {
130 | DispatchQueue.main.async {
131 | self.productsFetchDidFailed?(InAppStoreKitError.productsListEmpty)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
132 | }
133 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:136:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
134 | mergeIntoCache(response.products)
135 | DispatchQueue.main.async {
136 | self.productsInfoRequestDidFinished?(response.products)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
137 | }
138 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:157:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
155 |
156 | DispatchQueue.main.async {
157 | self.productDidSuccessPurchased?(productId)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
158 | }
159 | case .restored:
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:169:25: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
167 | if let skError = transaction.error as? SKError,
168 | skError.code == .paymentCancelled {
169 | self.productDidFailedPurchased?(InAppStoreKitError.userCancelled)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
170 | } else {
171 | self.productDidFailedPurchased?(transaction.error ?? InAppStoreKitError.unknown)
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:177:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
175 | isPurchaseInProgress = false
176 | DispatchQueue.main.async {
177 | self.productDidFailedPurchased?(InAppStoreKitError.pending)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
178 | }
179 | default:
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:194:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
192 | DispatchQueue.main.async {
193 | if ids.isEmpty {
194 | self.productDidFailedRestored?(InAppStoreKitError.failedRestore)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
195 | } else {
196 | self.productDidSuccessRestored?(ids)
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:212:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
210 |
211 | DispatchQueue.main.async {
212 | self.productDidFailedRestored?(error)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
213 | }
214 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppLegacyService.swift:237:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
235 |
236 | DispatchQueue.main.async {
237 | self.productsFetchDidFailed?(error)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
238 | }
239 | }
[9/11] Compiling InAppMaster InAppModernService.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:18:32: error: 'Product' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
16 | static let shared = InAppModernService()
17 |
18 | private var iapProducts = [Product]()
| `- error: 'Product' is only available in macOS 12.0 or newer
19 | private var updatesTask: Task<Void, Never>?
20 | private var finishedTransactionIDs = Set<UInt64>()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:19:30: error: 'Task' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
17 |
18 | private var iapProducts = [Product]()
19 | private var updatesTask: Task<Void, Never>?
| `- error: 'Task' is only available in macOS 10.15 or newer
20 | private var finishedTransactionIDs = Set<UInt64>()
21 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:126:61: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:147:38: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
:
145 | /// Adds the products to the cache without removing already loaded ones.
146 | /// - Parameter products: The products to be added.
147 | func mergeIntoCache(_ products: [Product]) {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
148 | for product in products {
149 | if let index = iapProducts.firstIndex(where: { $0.id == product.id }) {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:28:23: error: 'Task' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | for await result in Transaction.updates {
30 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:28:23: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | for await result in Transaction.updates {
30 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:29:33: error: 'Transaction' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
29 | for await result in Transaction.updates {
| |- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
30 | guard case .verified(let transaction) = result else { continue }
31 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:29:45: error: 'updates' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
29 | for await result in Transaction.updates {
| |- error: 'updates' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
30 | guard case .verified(let transaction) = result else { continue }
31 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:48:40: error: 'purchase(options:)' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
43 | /// Initiates a purchase for the product.
44 | /// - Parameter id: The identifier of the product to be purchased.
45 | func purchaseMyProduct(id: String) async throws {
| `- note: add @available attribute to enclosing instance method
46 | let product = try await cachedOrFetchedProduct(id: id)
47 |
48 | let result = try await product.purchase()
| |- error: 'purchase(options:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
49 |
50 | switch result {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:73:19: error: 'AppStore' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
| |- error: 'AppStore' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
74 | for await result in Transaction.currentEntitlements {
75 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:73:28: error: 'sync()' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
| |- error: 'sync()' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
74 | for await result in Transaction.currentEntitlements {
75 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:74:29: error: 'Transaction' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
74 | for await result in Transaction.currentEntitlements {
| |- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
75 | guard case .verified(let transaction) = result else { continue }
76 | if transaction.revocationDate == nil {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:74:41: error: 'currentEntitlements' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
74 | for await result in Transaction.currentEntitlements {
| |- error: 'currentEntitlements' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
75 | guard case .verified(let transaction) = result else { continue }
76 | if transaction.revocationDate == nil {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:99:34: error: 'Product' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
89 | /// - Parameter productIdentifiers: The product identifiers to fetch.
90 | /// - Returns: An array of products matching the provided identifiers.
91 | func fetchAvailableProducts(
| `- note: add @available attribute to enclosing instance method
92 | productIdentifiers: [String]
93 | ) async throws -> [any InAppProductProtocol] {
:
97 | }
98 |
99 | let products = try await Product.products(for: identifiers)
| |- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
100 | mergeIntoCache(products)
101 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:99:42: error: 'products(for:)' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
89 | /// - Parameter productIdentifiers: The product identifiers to fetch.
90 | /// - Returns: An array of products matching the provided identifiers.
91 | func fetchAvailableProducts(
| `- note: add @available attribute to enclosing instance method
92 | productIdentifiers: [String]
93 | ) async throws -> [any InAppProductProtocol] {
:
97 | }
98 |
99 | let products = try await Product.products(for: identifiers)
| |- error: 'products(for:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
100 | mergeIntoCache(products)
101 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:108:29: error: 'Transaction' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
105 | /// Returns the JWS representation of the currently active subscription.
106 | /// - Returns: The JWS string of the active subscription, or `nil` if none is active.
107 | public func getCurrentActiveSubscriptionJWS() async -> String? {
| `- note: add @available attribute to enclosing instance method
108 | for await result in Transaction.currentEntitlements {
| |- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
109 | if case .verified(let transaction) = result,
110 | transaction.revocationDate == nil,
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:108:41: error: 'currentEntitlements' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
105 | /// Returns the JWS representation of the currently active subscription.
106 | /// - Returns: The JWS string of the active subscription, or `nil` if none is active.
107 | public func getCurrentActiveSubscriptionJWS() async -> String? {
| `- note: add @available attribute to enclosing instance method
108 | for await result in Transaction.currentEntitlements {
| |- error: 'currentEntitlements' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
109 | if case .verified(let transaction) = result,
110 | transaction.revocationDate == nil,
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:112:31: error: 'jwsRepresentation' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
105 | /// Returns the JWS representation of the currently active subscription.
106 | /// - Returns: The JWS string of the active subscription, or `nil` if none is active.
107 | public func getCurrentActiveSubscriptionJWS() async -> String? {
| `- note: add @available attribute to enclosing instance method
108 | for await result in Transaction.currentEntitlements {
109 | if case .verified(let transaction) = result,
110 | transaction.revocationDate == nil,
111 | (transaction.expirationDate ?? .distantFuture) > Date() {
112 | return result.jwsRepresentation
| |- error: 'jwsRepresentation' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
113 | }
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:131:34: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
129 | }
130 |
131 | let products = try await Product.products(for: [id])
| |- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
132 | mergeIntoCache(products)
133 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:131:42: error: 'products(for:)' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
129 | }
130 |
131 | let products = try await Product.products(for: [id])
| |- error: 'products(for:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
132 | mergeIntoCache(products)
133 |
[10/11] Compiling InAppMaster SKProduct+InAppProductProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/SKProduct+InAppProductProtocol.swift:39:28: error: 'Product' is only available in macOS 12.0 or newer
8 | import StoreKit
9 |
10 | extension SKProduct: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
11 | public var id: String {
12 | self.productIdentifier
:
37 |
38 | @available(iOS 15.0, *)
39 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
40 | nil
41 | }
[11/11] Compiling InAppMaster Product+InAppProductProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:34:28: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
:
32 |
33 | @available(iOS 15.0, *)
34 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
35 | self
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:11:11: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
[2/10] Compiling InAppMaster InAppStoreKitError.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/10] Compiling InAppMaster InAppService.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:47:13: error: 'Task' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
46 | if #available(iOS 15.0, *) {
47 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | do {
49 | let products = try await modernService.fetchAvailableProducts(
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:47:13: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
46 | if #available(iOS 15.0, *) {
47 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | do {
49 | let products = try await modernService.fetchAvailableProducts(
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:52:27: error: 'MainActor' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
50 | productIdentifiers: self.configuredProductIdentifiers
51 | )
52 | await MainActor.run {
| |- error: 'MainActor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | completion(.success(products))
54 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:52:37: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
50 | productIdentifiers: self.configuredProductIdentifiers
51 | )
52 | await MainActor.run {
| |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | completion(.success(products))
54 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:56:27: error: 'MainActor' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
54 | }
55 | } catch {
56 | await MainActor.run {
| |- error: 'MainActor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | completion(.failure(error))
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:56:37: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
41 | /// Fetch the available in-app products from the App Store.
42 | /// - Parameter completion: A closure called with the result containing the fetched products on success, or an error on failure.
43 | public func fetchProducts(
| `- note: add @available attribute to enclosing instance method
44 | completion: @escaping (Result<[any InAppProductProtocol], Error>) -> Void
45 | ) {
:
54 | }
55 | } catch {
56 | await MainActor.run {
| |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | completion(.failure(error))
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:78:13: error: 'Task' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
74 | /// - id: The identifier of the product.
75 | /// - completion: A closure called with the result containing the purchased on success, or an error on failure.
76 | public func purchaseProduct(id: String, completion: @escaping (Result<String, Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
77 | if #available(iOS 15.0, *) {
78 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
79 | do {
80 | try await modernService.purchaseMyProduct(id: id)
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:78:13: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
74 | /// - id: The identifier of the product.
75 | /// - completion: A closure called with the result containing the purchased on success, or an error on failure.
76 | public func purchaseProduct(id: String, completion: @escaping (Result<String, Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
77 | if #available(iOS 15.0, *) {
78 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
79 | do {
80 | try await modernService.purchaseMyProduct(id: id)
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:105:13: error: 'Task' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
101 | /// Restores previously purchased.
102 | /// - Parameter completion: A closure called with the result containing the identifiers of the restored products on success, or an error on failure.
103 | public func restoreProducts(completion: @escaping (Result<[String], Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
104 | if #available(iOS 15.0, *) {
105 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | do {
107 | let purchasedProducts = try await modernService.restorePurchase()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppService.swift:105:13: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
8 | import StoreKit
9 |
10 | final public class InAppService {
| `- note: add @available attribute to enclosing class
11 |
12 | // MARK: - Params
:
101 | /// Restores previously purchased.
102 | /// - Parameter completion: A closure called with the result containing the identifiers of the restored products on success, or an error on failure.
103 | public func restoreProducts(completion: @escaping (Result<[String], Error>) -> Void) {
| `- note: add @available attribute to enclosing instance method
104 | if #available(iOS 15.0, *) {
105 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | do {
107 | let purchasedProducts = try await modernService.restorePurchase()
[4/10] Compiling InAppMaster InAppLegacyService.swift
[5/10] Compiling InAppMaster Product+InAppProductProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:34:28: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
:
32 |
33 | @available(iOS 15.0, *)
34 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
35 | self
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:11:11: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
[6/10] Compiling InAppMaster SKProduct+InAppProductProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/SKProduct+InAppProductProtocol.swift:39:28: error: 'Product' is only available in macOS 12.0 or newer
8 | import StoreKit
9 |
10 | extension SKProduct: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
11 | public var id: String {
12 | self.productIdentifier
:
37 |
38 | @available(iOS 15.0, *)
39 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
40 | nil
41 | }
[7/10] Compiling InAppMaster InAppModernService.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:18:32: error: 'Product' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
16 | static let shared = InAppModernService()
17 |
18 | private var iapProducts = [Product]()
| `- error: 'Product' is only available in macOS 12.0 or newer
19 | private var updatesTask: Task<Void, Never>?
20 | private var finishedTransactionIDs = Set<UInt64>()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:19:30: error: 'Task' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
17 |
18 | private var iapProducts = [Product]()
19 | private var updatesTask: Task<Void, Never>?
| `- error: 'Task' is only available in macOS 10.15 or newer
20 | private var finishedTransactionIDs = Set<UInt64>()
21 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:126:61: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:147:38: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
:
145 | /// Adds the products to the cache without removing already loaded ones.
146 | /// - Parameter products: The products to be added.
147 | func mergeIntoCache(_ products: [Product]) {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
148 | for product in products {
149 | if let index = iapProducts.firstIndex(where: { $0.id == product.id }) {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:28:23: error: 'Task' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | for await result in Transaction.updates {
30 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:28:23: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | for await result in Transaction.updates {
30 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:29:33: error: 'Transaction' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
29 | for await result in Transaction.updates {
| |- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
30 | guard case .verified(let transaction) = result else { continue }
31 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:29:45: error: 'updates' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
24 |
25 | // MARK: - Init
26 | private init() {
| `- note: add @available attribute to enclosing initializer
27 | // External events
28 | updatesTask = Task { @MainActor in
29 | for await result in Transaction.updates {
| |- error: 'updates' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
30 | guard case .verified(let transaction) = result else { continue }
31 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:48:40: error: 'purchase(options:)' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
43 | /// Initiates a purchase for the product.
44 | /// - Parameter id: The identifier of the product to be purchased.
45 | func purchaseMyProduct(id: String) async throws {
| `- note: add @available attribute to enclosing instance method
46 | let product = try await cachedOrFetchedProduct(id: id)
47 |
48 | let result = try await product.purchase()
| |- error: 'purchase(options:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
49 |
50 | switch result {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:73:19: error: 'AppStore' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
| |- error: 'AppStore' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
74 | for await result in Transaction.currentEntitlements {
75 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:73:28: error: 'sync()' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
| |- error: 'sync()' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
74 | for await result in Transaction.currentEntitlements {
75 | guard case .verified(let transaction) = result else { continue }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:74:29: error: 'Transaction' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
74 | for await result in Transaction.currentEntitlements {
| |- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
75 | guard case .verified(let transaction) = result else { continue }
76 | if transaction.revocationDate == nil {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:74:41: error: 'currentEntitlements' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
68 | /// Restores previously purchased products.
69 | /// - Returns: A set of product identifiers for currently active purchases.
70 | func restorePurchase() async throws -> Set<String> {
| `- note: add @available attribute to enclosing instance method
71 | var purchasedProductIDs: Set<String> = []
72 |
73 | try await AppStore.sync()
74 | for await result in Transaction.currentEntitlements {
| |- error: 'currentEntitlements' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
75 | guard case .verified(let transaction) = result else { continue }
76 | if transaction.revocationDate == nil {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:99:34: error: 'Product' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
89 | /// - Parameter productIdentifiers: The product identifiers to fetch.
90 | /// - Returns: An array of products matching the provided identifiers.
91 | func fetchAvailableProducts(
| `- note: add @available attribute to enclosing instance method
92 | productIdentifiers: [String]
93 | ) async throws -> [any InAppProductProtocol] {
:
97 | }
98 |
99 | let products = try await Product.products(for: identifiers)
| |- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
100 | mergeIntoCache(products)
101 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:99:42: error: 'products(for:)' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
89 | /// - Parameter productIdentifiers: The product identifiers to fetch.
90 | /// - Returns: An array of products matching the provided identifiers.
91 | func fetchAvailableProducts(
| `- note: add @available attribute to enclosing instance method
92 | productIdentifiers: [String]
93 | ) async throws -> [any InAppProductProtocol] {
:
97 | }
98 |
99 | let products = try await Product.products(for: identifiers)
| |- error: 'products(for:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
100 | mergeIntoCache(products)
101 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:108:29: error: 'Transaction' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
105 | /// Returns the JWS representation of the currently active subscription.
106 | /// - Returns: The JWS string of the active subscription, or `nil` if none is active.
107 | public func getCurrentActiveSubscriptionJWS() async -> String? {
| `- note: add @available attribute to enclosing instance method
108 | for await result in Transaction.currentEntitlements {
| |- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
109 | if case .verified(let transaction) = result,
110 | transaction.revocationDate == nil,
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:108:41: error: 'currentEntitlements' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
105 | /// Returns the JWS representation of the currently active subscription.
106 | /// - Returns: The JWS string of the active subscription, or `nil` if none is active.
107 | public func getCurrentActiveSubscriptionJWS() async -> String? {
| `- note: add @available attribute to enclosing instance method
108 | for await result in Transaction.currentEntitlements {
| |- error: 'currentEntitlements' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
109 | if case .verified(let transaction) = result,
110 | transaction.revocationDate == nil,
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:112:31: error: 'jwsRepresentation' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
105 | /// Returns the JWS representation of the currently active subscription.
106 | /// - Returns: The JWS string of the active subscription, or `nil` if none is active.
107 | public func getCurrentActiveSubscriptionJWS() async -> String? {
| `- note: add @available attribute to enclosing instance method
108 | for await result in Transaction.currentEntitlements {
109 | if case .verified(let transaction) = result,
110 | transaction.revocationDate == nil,
111 | (transaction.expirationDate ?? .distantFuture) > Date() {
112 | return result.jwsRepresentation
| |- error: 'jwsRepresentation' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
113 | }
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:131:34: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
129 | }
130 |
131 | let products = try await Product.products(for: [id])
| |- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
132 | mergeIntoCache(products)
133 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:131:42: error: 'products(for:)' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
129 | }
130 |
131 | let products = try await Product.products(for: [id])
| |- error: 'products(for:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
132 | mergeIntoCache(products)
133 |
[8/10] Emitting module InAppMaster
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Data/InAppProductProtocol.swift:20:21: error: 'Product' is only available in macOS 12.0 or newer
9 | import StoreKit
10 |
11 | public protocol InAppProductProtocol {
| `- note: add @available attribute to enclosing protocol
12 | var id: String { get }
13 | var title: String { get }
:
18 | var rawSKProduct: SKProduct? { get }
19 | @available(iOS 15.0, *)
20 | var rawProduct: Product? { get }
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
21 | }
22 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:34:28: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
:
32 |
33 | @available(iOS 15.0, *)
34 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
35 | self
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/Product+InAppProductProtocol.swift:11:11: error: 'Product' is only available in macOS 12.0 or newer
9 |
10 | @available(iOS 15.0, *)
11 | extension Product: InAppProductProtocol {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | public var title: String {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Extensions/SKProduct+InAppProductProtocol.swift:39:28: error: 'Product' is only available in macOS 12.0 or newer
8 | import StoreKit
9 |
10 | extension SKProduct: InAppProductProtocol {
| `- note: add @available attribute to enclosing extension
11 | public var id: String {
12 | self.productIdentifier
:
37 |
38 | @available(iOS 15.0, *)
39 | public var rawProduct: Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
40 | nil
41 | }
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:18:32: error: 'Product' is only available in macOS 12.0 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
16 | static let shared = InAppModernService()
17 |
18 | private var iapProducts = [Product]()
| `- error: 'Product' is only available in macOS 12.0 or newer
19 | private var updatesTask: Task<Void, Never>?
20 | private var finishedTransactionIDs = Set<UInt64>()
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:19:30: error: 'Task' is only available in macOS 10.15 or newer
11 | @available(iOS 15.0, *)
12 | @MainActor
13 | final public class InAppModernService {
| `- note: add @available attribute to enclosing class
14 |
15 | // MARK: - Params
:
17 |
18 | private var iapProducts = [Product]()
19 | private var updatesTask: Task<Void, Never>?
| `- error: 'Task' is only available in macOS 10.15 or newer
20 | private var finishedTransactionIDs = Set<UInt64>()
21 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:126:61: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
124 | /// - Parameter id: The identifier of the product.
125 | /// - Returns: The product matching the provided identifier.
126 | func cachedOrFetchedProduct(id: String) async throws -> Product {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
127 | if let product = iapProducts.first(where: { $0.id == id }) {
128 | return product
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppModernService.swift:147:38: error: 'Product' is only available in macOS 12.0 or newer
119 | // MARK: - Helpers
120 | @available(iOS 15.0, *)
121 | private extension InAppModernService {
| `- note: add @available attribute to enclosing extension
122 |
123 | /// Returns the product from the cache or loads it from the App Store.
:
145 | /// Adds the products to the cache without removing already loaded ones.
146 | /// - Parameter products: The products to be added.
147 | func mergeIntoCache(_ products: [Product]) {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
148 | for product in products {
149 | if let index = iapProducts.firstIndex(where: { $0.id == product.id }) {
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:16:45: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
14 | static public let shared = InAppRefreshReceiptService()
15 |
16 | private var receiptRefreshContinuation: CheckedContinuation<Void, Error>?
| `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
17 | private var receiptRefreshRequest: SKReceiptRefreshRequest?
18 |
[9/10] Compiling InAppMaster InAppProductProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Data/InAppProductProtocol.swift:20:21: error: 'Product' is only available in macOS 12.0 or newer
9 | import StoreKit
10 |
11 | public protocol InAppProductProtocol {
| `- note: add @available attribute to enclosing protocol
12 | var id: String { get }
13 | var title: String { get }
:
18 | var rawSKProduct: SKProduct? { get }
19 | @available(iOS 15.0, *)
20 | var rawProduct: Product? { get }
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing property
21 | }
22 |
[10/10] Compiling InAppMaster InAppRefreshReceiptService.swift
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:16:45: error: 'CheckedContinuation' is only available in macOS 10.15 or newer
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
14 | static public let shared = InAppRefreshReceiptService()
15 |
16 | private var receiptRefreshContinuation: CheckedContinuation<Void, Error>?
| `- error: 'CheckedContinuation' is only available in macOS 10.15 or newer
17 | private var receiptRefreshRequest: SKReceiptRefreshRequest?
18 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:30:26: error: 'withCheckedThrowingContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
:
23 |
24 | /// Refreshes the App Store receipt.
25 | public func refreshReceipt() async throws {
| `- note: add @available attribute to enclosing instance method
26 | if receiptRefreshContinuation != nil {
27 | throw InAppStoreKitError.pending
28 | }
29 |
30 | return try await withCheckedThrowingContinuation { continuation in
| |- error: 'withCheckedThrowingContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
31 | self.receiptRefreshContinuation = continuation
32 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:30:59: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:30:58: note: expanded code originates here
9 | import StoreKit
10 |
11 | final public class InAppRefreshReceiptService: NSObject {
| `- note: add @available attribute to enclosing class
12 |
13 | // MARK: - Params
:
23 |
24 | /// Refreshes the App Store receipt.
25 | public func refreshReceipt() async throws {
| `- note: add @available attribute to enclosing instance method
26 | if receiptRefreshContinuation != nil {
27 | throw InAppStoreKitError.pending
28 | }
29 |
30 | return try await withCheckedThrowingContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift
|28 |
|29 |
|30 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+-------------------------------------------------------------------------------------------------------------
31 | self.receiptRefreshContinuation = continuation
32 |
/Users/admin/builder/spi-builder-workspace/Sources/InAppMaster/Services/InAppRefreshReceiptService.swift:47:37: error: 'resume()' is only available in macOS 10.15 or newer
40 |
41 | // MARK: - SKRequestDelegate
42 | extension InAppRefreshReceiptService: SKRequestDelegate {
| `- note: add @available attribute to enclosing extension
43 |
44 | /// Called when the receipt refresh request finishes successfully.
45 | /// - Parameter request: The request that finished.
46 | public func requestDidFinish(_ request: SKRequest) {
| `- note: add @available attribute to enclosing instance method
47 | receiptRefreshContinuation?.resume()
| |- error: 'resume()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | receiptRefreshContinuation = nil
49 | receiptRefreshRequest = nil
BUILD FAILURE 6.1 macosSpm