Build Information
Failed to build IosIapStore, reference v1.0.1 (102915), with Swift 6.2 for macOS (SPM) on 22 Jun 2025 15:36:32 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-26.0.0-Beta.app xcrun swift build --arch arm64Build Log
24 | Text(product.name)
25 | .font(.title2)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:23:54: error: conformance of 'Optional<Wrapped>' to 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
| |- error: conformance of 'Optional<Wrapped>' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
24 | Text(product.name)
25 | .font(.title2)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:23:54: error: conformance of 'Optional<Wrapped>' to 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
| |- error: conformance of 'Optional<Wrapped>' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
24 | Text(product.name)
25 | .font(.title2)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:51:13: error: conformance of 'Spacer' to 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
49 | }
50 |
51 | Spacer()
| |- error: conformance of 'Spacer' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
52 | radioButton
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:51:13: error: 'Spacer' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
49 | }
50 |
51 | Spacer()
| |- error: 'Spacer' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
52 | radioButton
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:22:15: error: conformance of 'Spacer' to 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
| |- error: conformance of 'Spacer' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
23 | VStack(alignment: .leading, spacing: 10) {
24 | Text(product.name)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:54:10: error: 'padding' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
52 | radioButton
53 | }
54 | .padding()
| |- error: 'padding' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
55 | .background(
56 | isSelected
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:55:10: error: 'background(_:ignoresSafeAreaEdges:)' is only available in macOS 12.0 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
53 | }
54 | .padding()
55 | .background(
| |- error: 'background(_:ignoresSafeAreaEdges:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:57:15: error: 'LinearGradient' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
55 | .background(
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'LinearGradient' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
59 | )
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:57:40: error: 'Gradient' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
55 | .background(
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'Gradient' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
59 | )
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:57:59: error: 'mint' is only available in macOS 12.0 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
55 | .background(
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'mint' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
59 | )
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:57:66: error: 'cyan' is only available in macOS 12.0 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
55 | .background(
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'cyan' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
59 | )
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:15: error: 'LinearGradient' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'LinearGradient' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:40: error: 'Gradient' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'Gradient' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:58: error: 'Color' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:64: error: 'gray' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'gray' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:69: error: 'opacity' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:83: error: 'Color' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:89: error: 'gray' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'gray' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:58:94: error: 'opacity' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
56 | isSelected
57 | ? LinearGradient(gradient: Gradient(colors: [.mint, .cyan]), startPoint: .topLeading, endPoint: .bottomTrailing)
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | )
60 | .cornerRadius(12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:60:10: error: 'cornerRadius(_:antialiased:)' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
58 | : LinearGradient(gradient: Gradient(colors: [Color.gray.opacity(0.2), Color.gray.opacity(0.3)]), startPoint: .topLeading, endPoint: .bottomTrailing)
59 | )
60 | .cornerRadius(12)
| |- error: 'cornerRadius(_:antialiased:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:61:10: error: 'overlay(_:alignment:)' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
59 | )
60 | .cornerRadius(12)
61 | .overlay(
| |- error: 'overlay(_:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
62 | RoundedRectangle(cornerRadius: 12)
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:62:13: error: 'RoundedRectangle' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
60 | .cornerRadius(12)
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
| |- error: 'RoundedRectangle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
64 | )
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:63:18: error: 'stroke(_:lineWidth:antialiased:)' is only available in macOS 14.0 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
| |- error: 'stroke(_:lineWidth:antialiased:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
64 | )
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:63:38: error: 'Color' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | )
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:63:44: error: 'blue' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
| |- error: 'blue' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | )
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:63:51: error: 'Color' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | )
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:63:57: error: 'gray' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
| |- error: 'gray' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | )
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:63:62: error: 'opacity' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
:
61 | .overlay(
62 | RoundedRectangle(cornerRadius: 12)
63 | .stroke(isSelected ? Color.blue : Color.gray.opacity(0.5), lineWidth: 1)
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | )
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:70:9: error: 'ZStack' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
| |- error: 'ZStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:70:16: error: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
| |- error: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:70:16: error: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
| |- error: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:71:13: error: 'Circle' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
| |- error: 'Circle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:72:18: error: 'stroke(_:lineWidth:antialiased:)' is only available in macOS 14.0 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
| |- error: 'stroke(_:lineWidth:antialiased:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
74 | .frame(width: 24, height: 24)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:72:38: error: 'Color' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
74 | .frame(width: 24, height: 24)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:72:44: error: 'blue' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
| |- error: 'blue' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
74 | .frame(width: 24, height: 24)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:72:51: error: 'Color' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
74 | .frame(width: 24, height: 24)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:72:57: error: 'gray' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
| |- error: 'gray' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
74 | .frame(width: 24, height: 24)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:73:18: error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
| |- error: 'background(_:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
74 | .frame(width: 24, height: 24)
75 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:73:29: error: 'Circle' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
| |- error: 'Circle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
74 | .frame(width: 24, height: 24)
75 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:73:38: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
74 | .frame(width: 24, height: 24)
75 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:73:56: error: 'Color' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
74 | .frame(width: 24, height: 24)
75 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:73:62: error: 'blue' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
| |- error: 'blue' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
74 | .frame(width: 24, height: 24)
75 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:73:69: error: 'Color' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
74 | .frame(width: 24, height: 24)
75 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:73:75: error: 'clear' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
| |- error: 'clear' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
74 | .frame(width: 24, height: 24)
75 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:74:18: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
73 | .background(Circle().fill(isSelected ? Color.blue : Color.clear))
74 | .frame(width: 24, height: 24)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
75 |
76 | if isSelected {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:77:17: error: 'Image' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
75 |
76 | if isSelected {
77 | Image(systemName: "checkmark")
| |- error: 'Image' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
78 | .foregroundColor(.white)
79 | .font(.system(size: 14, weight: .bold))
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:77:17: error: 'init(systemName:)' is only available in macOS 11.0 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
75 |
76 | if isSelected {
77 | Image(systemName: "checkmark")
| |- error: 'init(systemName:)' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
78 | .foregroundColor(.white)
79 | .font(.system(size: 14, weight: .bold))
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:78:22: error: 'foregroundColor' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
76 | if isSelected {
77 | Image(systemName: "checkmark")
78 | .foregroundColor(.white)
| |- error: 'foregroundColor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
79 | .font(.system(size: 14, weight: .bold))
80 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:78:39: error: 'white' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
76 | if isSelected {
77 | Image(systemName: "checkmark")
78 | .foregroundColor(.white)
| |- error: 'white' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
79 | .font(.system(size: 14, weight: .bold))
80 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:79:22: error: 'font' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
77 | Image(systemName: "checkmark")
78 | .foregroundColor(.white)
79 | .font(.system(size: 14, weight: .bold))
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
80 | }
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:79:28: error: 'system(size:weight:design:)' is only available in macOS 13.0 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
77 | Image(systemName: "checkmark")
78 | .foregroundColor(.white)
79 | .font(.system(size: 14, weight: .bold))
| |- error: 'system(size:weight:design:)' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
80 | }
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:76:27: error: 'buildIf' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
74 | .frame(width: 24, height: 24)
75 |
76 | if isSelected {
| |- error: 'buildIf' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
77 | Image(systemName: "checkmark")
78 | .foregroundColor(.white)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:80:13: error: 'buildIf' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
:
78 | .foregroundColor(.white)
79 | .font(.system(size: 14, weight: .bold))
80 | }
| |- error: 'buildIf' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
81 | }
82 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:70:16: error: conformance of 'Optional<Wrapped>' to 'View' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| `- note: add @available attribute to enclosing property
70 | ZStack {
| |- error: conformance of 'Optional<Wrapped>' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | Circle()
72 | .stroke(isSelected ? Color.blue : Color.gray, lineWidth: 2)
[12/16] Compiling IosIapStore SKProductStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:14:79: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
14 | func fetchProductsFromAppStore(for productIds: [String]) async throws -> [Product] {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
15 | print("fetchProductsFromAppStore = \(productIds)")
16 | if(productIds.isEmpty) {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:34:35: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
32 | }
33 |
34 | func sortByPrice(_ products: [Product]) -> [Product] {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
35 | products.sorted(by: {return $0.price < $1.price})
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:34:49: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
32 | }
33 |
34 | func sortByPrice(_ products: [Product]) -> [Product] {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
35 | products.sorted(by: {return $0.price < $1.price})
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:77:92: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
75 | }
76 |
77 | func getSubscriptionGroupIdentifier(for transaction: Transaction, from storeProducts: [Product]) -> String? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
78 | if let product = storeProducts.first(where: { $0.id == transaction.productID }) {
79 | return product.subscription?.subscriptionGroupID
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:84:38: error: 'VerificationResult' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
82 | }
83 |
84 | func checkVerified<T> (_ result: VerificationResult<T>) throws -> T {
| | `- error: 'VerificationResult' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
85 | switch result {
86 | case .unverified:
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:93:71: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
91 | }
92 |
93 | func getStoreProduct(with productId: String, from storeProducts: [Product]) -> Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
94 | return storeProducts.first(where: { $0.id == productId })
95 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:93:84: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
91 | }
92 |
93 | func getStoreProduct(with productId: String, from storeProducts: [Product]) -> Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
94 | return storeProducts.first(where: { $0.id == productId })
95 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:21:46: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
14 | func fetchProductsFromAppStore(for productIds: [String]) async throws -> [Product] {
| `- note: add @available attribute to enclosing instance method
15 | print("fetchProductsFromAppStore = \(productIds)")
16 | if(productIds.isEmpty) {
:
19 | do {
20 | print("fetchProductsFromAppStore = start")
21 | let allStoreProducts = try await Product.products(for: productIds)
| |- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
22 | if allStoreProducts.count == 0 {
23 | throw StoreError.noProductsInStore
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:21:54: error: 'products(for:)' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
14 | func fetchProductsFromAppStore(for productIds: [String]) async throws -> [Product] {
| `- note: add @available attribute to enclosing instance method
15 | print("fetchProductsFromAppStore = \(productIds)")
16 | if(productIds.isEmpty) {
:
19 | do {
20 | print("fetchProductsFromAppStore = start")
21 | let allStoreProducts = try await Product.products(for: productIds)
| |- error: 'products(for:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
22 | if allStoreProducts.count == 0 {
23 | throw StoreError.noProductsInStore
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:62:36: error: 'price' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
46 | }
47 |
48 | func mapTransactionToDetails(for transaction: Transaction, with userId: String) -> TransactionDetails {
| `- note: add @available attribute to enclosing instance method
49 |
50 | return TransactionDetails(
:
60 | originalPurchaseDate: transaction.originalPurchaseDate.timeIntervalSince1970,
61 | originalTransactionId: transaction.originalID,
62 | price: transaction.price ?? Decimal(0),
| |- error: 'price' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
63 | productId: transaction.productID,
64 | purchaseDate: transaction.purchaseDate.timeIntervalSince1970,
error: emit-module command failed with exit code 1 (use -v to see invocation)
[13/16] Emitting module IosIapStore
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:15:34: error: 'Transaction' is only available in macOS 12.0 or newer
13 | }
14 |
15 | typealias Transaction = StoreKit.Transaction
| | `- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:16:34: error: 'Product' is only available in macOS 12.0 or newer
14 |
15 | typealias Transaction = StoreKit.Transaction
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:17:35: error: 'Product' is only available in macOS 12.0 or newer
15 | typealias Transaction = StoreKit.Transaction
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
18 |
19 | class RootStore: ObservableObject {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:20:6: error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
| `- error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:20:6: error: 'AppStorage' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
| `- error: 'AppStorage' is only available in macOS 11.0 or newer
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:21:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:22:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
| `- error: 'Published' is only available in macOS 10.15 or newer
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:23:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
| `- error: 'Published' is only available in macOS 10.15 or newer
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:24:49: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
| `- error: 'Product' is only available in macOS 12.0 or newer
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:24:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:25:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
| `- error: 'Published' is only available in macOS 10.15 or newer
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:26:58: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
| `- error: 'Product' is only available in macOS 12.0 or newer
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:26:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:27:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
28 | @Published private(set) var productIds: [String] = []
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:28:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
30 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:29:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
| `- error: 'Published' is only available in macOS 10.15 or newer
30 |
31 | var updateListenerTask: Task<Void, Error>? = nil
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:31:29: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
30 |
31 | var updateListenerTask: Task<Void, Error>? = nil
| `- error: 'Task' is only available in macOS 10.15 or newer
32 |
33 | let sk2Store = SKProductStore()
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:191:37: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| | `- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:19:18: error: 'ObservableObject' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:14:79: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
14 | func fetchProductsFromAppStore(for productIds: [String]) async throws -> [Product] {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
15 | print("fetchProductsFromAppStore = \(productIds)")
16 | if(productIds.isEmpty) {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:34:35: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
32 | }
33 |
34 | func sortByPrice(_ products: [Product]) -> [Product] {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
35 | products.sorted(by: {return $0.price < $1.price})
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:34:49: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
32 | }
33 |
34 | func sortByPrice(_ products: [Product]) -> [Product] {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
35 | products.sorted(by: {return $0.price < $1.price})
36 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:77:92: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
75 | }
76 |
77 | func getSubscriptionGroupIdentifier(for transaction: Transaction, from storeProducts: [Product]) -> String? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
78 | if let product = storeProducts.first(where: { $0.id == transaction.productID }) {
79 | return product.subscription?.subscriptionGroupID
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:84:38: error: 'VerificationResult' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
82 | }
83 |
84 | func checkVerified<T> (_ result: VerificationResult<T>) throws -> T {
| | `- error: 'VerificationResult' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
85 | switch result {
86 | case .unverified:
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:93:71: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
91 | }
92 |
93 | func getStoreProduct(with productId: String, from storeProducts: [Product]) -> Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
94 | return storeProducts.first(where: { $0.id == productId })
95 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/SKProductStore.swift:93:84: error: 'Product' is only available in macOS 12.0 or newer
9 | import Foundation
10 |
11 | struct SKProductStore {
| `- note: add @available attribute to enclosing struct
12 | let subscriptionPlanService = SubscriptionPlanService();
13 |
:
91 | }
92 |
93 | func getStoreProduct(with productId: String, from storeProducts: [Product]) -> Product? {
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing instance method
94 | return storeProducts.first(where: { $0.id == productId })
95 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:11:6: error: 'EnvironmentObject' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
| `- error: 'EnvironmentObject' is only available in macOS 10.15 or newer
12 |
13 | var product: SubscriptionPlan
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:21:20: error: 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListItemView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
19 | }
20 |
21 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
22 | HStack{
23 | VStack(alignment: .leading, spacing: 10) {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListItemView.swift:69:35: error: 'View' is only available in macOS 10.15 or newer
66 | }
67 |
68 | extension ProductListItemView {
| `- note: add @available attribute to enclosing extension
69 | private var radioButton: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
70 | ZStack {
71 | Circle()
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListView.swift:11:6: error: 'EnvironmentObject' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
| `- error: 'EnvironmentObject' is only available in macOS 10.15 or newer
12 | var body: some View {
13 | ScrollView(.vertical, showsIndicators: false){
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ProductListView.swift:12:20: error: 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ProductListView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
13 | ScrollView(.vertical, showsIndicators: false){
14 | VStack(spacing: 20) {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/PurchaseButtonView.swift:11:6: error: 'EnvironmentObject' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct PurchaseButtonView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
| `- error: 'EnvironmentObject' is only available in macOS 10.15 or newer
12 |
13 | func getRecurringDescriptionText() -> String {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/PurchaseButtonView.swift:19:20: error: 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct PurchaseButtonView: View {
| `- note: add @available attribute to enclosing struct
11 | @EnvironmentObject var store: RootStore
12 |
:
17 | return ""
18 | }
19 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
20 | VStack(spacing: 8) {
21 | recurringText
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/PurchaseButtonView.swift:28:38: error: 'View' is only available in macOS 10.15 or newer
25 | }
26 |
27 | extension PurchaseButtonView {
| `- note: add @available attribute to enclosing extension
28 | private var purchaseButton: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
29 | Button(action: {
30 | if let selectedPlan = store.selectedProduct {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/PurchaseButtonView.swift:49:37: error: 'View' is only available in macOS 10.15 or newer
25 | }
26 |
27 | extension PurchaseButtonView {
| `- note: add @available attribute to enclosing extension
28 | private var purchaseButton: some View {
29 | Button(action: {
:
47 | }
48 |
49 | private var recurringText: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
50 | Text(getRecurringDescriptionText())
51 | .font(.footnote)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/RootStoreView.swift:12:6: error: 'State' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public struct RootStoreView: View {
| `- note: add @available attribute to enclosing struct
11 | private let apiKey: String
12 | @State private var showToast: Bool = false
| `- error: 'State' is only available in macOS 10.15 or newer
13 | @StateObject private var store: RootStore
14 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/RootStoreView.swift:13:6: error: 'StateObject' is only available in macOS 11.0 or newer
8 | import SwiftUI
9 |
10 | public struct RootStoreView: View {
| `- note: add @available attribute to enclosing struct
11 | private let apiKey: String
12 | @State private var showToast: Bool = false
13 | @StateObject private var store: RootStore
| `- error: 'StateObject' is only available in macOS 11.0 or newer
14 |
15 | public init(
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/RootStoreView.swift:37:27: error: 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | public struct RootStoreView: View {
| `- note: add @available attribute to enclosing struct
11 | private let apiKey: String
12 | @State private var showToast: Bool = false
:
35 | }
36 |
37 | public var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
38 | ZStack {
39 | paymentContent
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/RootStoreView.swift:51:34: error: 'View' is only available in macOS 10.15 or newer
48 | }
49 |
50 | extension RootStoreView {
| `- note: add @available attribute to enclosing extension
51 | private var errorToast: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
52 | Group {
53 | if showToast, let message = store.errorMessage {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/RootStoreView.swift:65:38: error: 'View' is only available in macOS 10.15 or newer
48 | }
49 |
50 | extension RootStoreView {
| `- note: add @available attribute to enclosing extension
51 | private var errorToast: some View {
52 | Group {
:
63 | }
64 |
65 | private var paymentContent: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
66 | VStack {
67 | StoreContent()
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/StoreContent.swift:11:6: error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
8 | import SwiftUI
9 |
10 | struct StoreContent: View {
| `- note: add @available attribute to enclosing struct
11 | @AppStorage("subscribed") private var subscribed: Bool = false
| `- error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
12 | @EnvironmentObject var store: RootStore
13 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/StoreContent.swift:11:6: error: 'AppStorage' is only available in macOS 11.0 or newer
8 | import SwiftUI
9 |
10 | struct StoreContent: View {
| `- note: add @available attribute to enclosing struct
11 | @AppStorage("subscribed") private var subscribed: Bool = false
| `- error: 'AppStorage' is only available in macOS 11.0 or newer
12 | @EnvironmentObject var store: RootStore
13 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/StoreContent.swift:12:6: error: 'EnvironmentObject' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct StoreContent: View {
| `- note: add @available attribute to enclosing struct
11 | @AppStorage("subscribed") private var subscribed: Bool = false
12 | @EnvironmentObject var store: RootStore
| `- error: 'EnvironmentObject' is only available in macOS 10.15 or newer
13 |
14 | var body: some View {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/StoreContent.swift:14:20: error: 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct StoreContent: View {
| `- note: add @available attribute to enclosing struct
11 | @AppStorage("subscribed") private var subscribed: Bool = false
12 | @EnvironmentObject var store: RootStore
13 |
14 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
15 | ZStack {
16 | VStack {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Views/ToastView.swift:13:20: error: 'View' is only available in macOS 10.15 or newer
8 | import SwiftUI
9 |
10 | struct ToastView: View {
| `- note: add @available attribute to enclosing struct
11 | let message: String
12 |
13 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
14 | Text(message)
15 | .foregroundColor(.white)
[14/16] Compiling IosIapStore SubscriptionPlanService.swift
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Services/SubscriptionPlanService.swift:16:57: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
8 | import Foundation
9 |
10 | struct SubscriptionPlanService {
| `- note: add @available attribute to enclosing struct
11 | func loadSubscriptionPlans(apiKey: String) async throws -> [SubscriptionPlan] {
| `- note: add @available attribute to enclosing instance method
12 | do {
13 | let url = URL(string: "https://05052a84-35de-4a87-ae64-2b32a9188b68.mock.pstmn.io/productDetails")!
14 | var request = URLRequest(url: url)
15 | request.setValue(apiKey, forHTTPHeaderField: "Authorization")
16 | let (data, _) = try await URLSession.shared.data(for: request)
| |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
17 | let plans = try JSONDecoder().decode([SubscriptionPlan].self, from: data)
18 | return plans
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Services/SubscriptionPlanService.swift:45:51: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
8 | import Foundation
9 |
10 | struct SubscriptionPlanService {
| `- note: add @available attribute to enclosing struct
11 | func loadSubscriptionPlans(apiKey: String) async throws -> [SubscriptionPlan] {
12 | do {
:
22 | }
23 |
24 | func sendVerifiedCheck(transaction: TransactionDetails, apiKey: String) async throws {
| `- note: add @available attribute to enclosing instance method
25 | let urlString = "https://05052a84-35de-4a87-ae64-2b32a9188b68.mock.pstmn.io/transaction"
26 | let url = URL(string: urlString)
:
43 | // Set the HTTP body to the encoded JSON
44 | request.httpBody = jsonData
45 | let (data, _) = try await session.data(for: request);
| |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
46 | print("Post API response = \(data)")
47 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:15:34: error: 'Transaction' is only available in macOS 12.0 or newer
13 | }
14 |
15 | typealias Transaction = StoreKit.Transaction
| | `- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:16:34: error: 'Product' is only available in macOS 12.0 or newer
14 |
15 | typealias Transaction = StoreKit.Transaction
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:17:35: error: 'Product' is only available in macOS 12.0 or newer
15 | typealias Transaction = StoreKit.Transaction
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
18 |
19 | class RootStore: ObservableObject {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:20:6: error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
| `- error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:20:6: error: 'AppStorage' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
| `- error: 'AppStorage' is only available in macOS 11.0 or newer
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:21:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:22:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
| `- error: 'Published' is only available in macOS 10.15 or newer
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:23:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
| `- error: 'Published' is only available in macOS 10.15 or newer
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:24:49: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
| `- error: 'Product' is only available in macOS 12.0 or newer
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:24:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:25:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
| `- error: 'Published' is only available in macOS 10.15 or newer
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:26:58: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
| `- error: 'Product' is only available in macOS 12.0 or newer
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:26:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:27:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
28 | @Published private(set) var productIds: [String] = []
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:28:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
30 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:29:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
| `- error: 'Published' is only available in macOS 10.15 or newer
30 |
31 | var updateListenerTask: Task<Void, Error>? = nil
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:31:29: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
30 |
31 | var updateListenerTask: Task<Void, Error>? = nil
| `- error: 'Task' is only available in macOS 10.15 or newer
32 |
33 | let sk2Store = SKProductStore()
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:191:37: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| | `- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:19:18: error: 'ObservableObject' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [SubscriptionPlan]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [SubscriptionPlan]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, Bool> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, Bool>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, String?> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, String?>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [Product]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [Product]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, SubscriptionPlan?> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, SubscriptionPlan?>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [Product]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [Product]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [SubscriptionPlan]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [SubscriptionPlan]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [String]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [String]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, RenewalState?> & Sendable' (aka 'any KeyPath<RootStore, Optional<Product.SubscriptionInfo.RenewalState>> & Sendable') to expected argument type 'ReferenceWritableKeyPath<RootStore, RenewalState?>' (aka 'ReferenceWritableKeyPath<RootStore, Optional<Product.SubscriptionInfo.RenewalState>>')
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:45:29: error: 'cancel()' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
43 | }
44 | deinit {
45 | updateListenerTask?.cancel()
| |- error: 'cancel()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
46 | }
47 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:50:9: error: setter for 'availableProducts' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
47 |
48 | @MainActor
49 | private func updateAvaiableProducts() {
| `- note: add @available attribute to enclosing instance method
50 | availableProducts = apiSubscriptionPlans.filter { plan in
| |- error: setter for 'availableProducts' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
51 | storeProducts.contains { $0.id == plan.productId }
52 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:56:9: error: setter for 'productIds' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
53 | }
54 | @MainActor
55 | private func updateProductIds() {
| `- note: add @available attribute to enclosing instance method
56 | productIds = apiSubscriptionPlans.map { $0.productId };
| |- error: setter for 'productIds' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | }
58 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:63:13: error: setter for 'apiSubscriptionPlans' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
59 |
60 | @MainActor
61 | func fetchSubscriptionPlans(apiKey: String) async {
| `- note: add @available attribute to enclosing instance method
62 | do {
63 | self.apiSubscriptionPlans = try await subscriptionPlanService.loadSubscriptionPlans(apiKey: apiKey)
| |- error: setter for 'apiSubscriptionPlans' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | print("fetchSubscriptionPlans = \(apiSubscriptionPlans.count)")
65 | self.updateProductIds();
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:67:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
59 |
60 | @MainActor
61 | func fetchSubscriptionPlans(apiKey: String) async {
| `- note: add @available attribute to enclosing instance method
62 | do {
63 | self.apiSubscriptionPlans = try await subscriptionPlanService.loadSubscriptionPlans(apiKey: apiKey)
:
65 | self.updateProductIds();
66 | } catch {
67 | self.errorMessage = "Failed to load subscription plans: \(error.localizedDescription)"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
68 | self.isLoading = false
69 | print("fetchSubscriptionPlans - \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:68:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
59 |
60 | @MainActor
61 | func fetchSubscriptionPlans(apiKey: String) async {
| `- note: add @available attribute to enclosing instance method
62 | do {
63 | self.apiSubscriptionPlans = try await subscriptionPlanService.loadSubscriptionPlans(apiKey: apiKey)
:
66 | } catch {
67 | self.errorMessage = "Failed to load subscription plans: \(error.localizedDescription)"
68 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
69 | print("fetchSubscriptionPlans - \(error)")
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:76:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
77 | self.isLoading = false
78 | return
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:77:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
77 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
78 | return
79 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:83:13: error: setter for 'storeProducts' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
81 | do {
82 | let sk2Products = try await sk2Store.fetchProductsFromAppStore(for: productIds)
83 | storeProducts = sk2Products
| |- error: setter for 'storeProducts' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
84 | print("fetchStoreProducts = \(sk2Products.count)")
85 | self.updateAvaiableProducts();
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:86:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
84 | print("fetchStoreProducts = \(sk2Products.count)")
85 | self.updateAvaiableProducts();
86 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
87 | } catch StoreError.noProductsInStore {
88 | let errMsg = "Got 0 products in App store."
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:89:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
87 | } catch StoreError.noProductsInStore {
88 | let errMsg = "Got 0 products in App store."
89 | errorMessage = errMsg
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
90 | self.isLoading = false
91 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:90:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
88 | let errMsg = "Got 0 products in App store."
89 | errorMessage = errMsg
90 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
91 | } catch {
92 | let errMsg = "Failed to fetch App Store products: \(error.localizedDescription)"
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:93:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
91 | } catch {
92 | let errMsg = "Failed to fetch App Store products: \(error.localizedDescription)"
93 | errorMessage = errMsg
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | print("fetchStoreProducts - \(error)")
95 | self.isLoading = false
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:95:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
93 | errorMessage = errMsg
94 | print("fetchStoreProducts - \(error)")
95 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
96 | }
97 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:102:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
103 | return
104 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:106:44: error: 'purchase(options:)' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
104 | }
105 | do {
106 | let result = try await product.purchase()
| |- error: 'purchase(options:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
107 | // print("purchaseProduct result - \(result)")
108 | switch result {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:117:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
115 |
116 | await transaction.finish()
117 | errorMessage = nil
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
118 | case .userCancelled:
119 | errorMessage = "User cancelled the purchase"
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:119:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
117 | errorMessage = nil
118 | case .userCancelled:
119 | errorMessage = "User cancelled the purchase"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 |
121 | case .pending:
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:122:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
120 |
121 | case .pending:
122 | errorMessage = "Purchase is pending"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
123 |
124 | default:
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:125:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
123 |
124 | default:
125 | errorMessage = "Unknown purchase result"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
126 |
127 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:129:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
127 | }
128 | } catch {
129 | errorMessage = "Purchase failed: \(error.localizedDescription)"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | }
131 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:136:29: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
| |- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
137 |
138 | var latestTransactions: [String: Transaction] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:140:41: error: 'currentEntitlements' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
138 | var latestTransactions: [String: Transaction] = [:]
139 |
140 | for await result in Transaction.currentEntitlements {
| |- error: 'currentEntitlements' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
141 | do{
142 | let transaction = try sk2Store.checkVerified(result)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:158:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
156 | }
157 | } catch {
158 | errorMessage = "Could not find products. \(error.localizedDescription)"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
159 | }
160 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:168:9: error: setter for 'purchasedSubscriptions' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
166 | }
167 |
168 | self.purchasedSubscriptions = purchasedSubs
| |- error: setter for 'purchasedSubscriptions' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
169 |
170 | subscriptionGroupStatus = try? await storeProducts.first?.subscription?.status.first?.state
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:170:9: error: setter for 'subscriptionGroupStatus' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
168 | self.purchasedSubscriptions = purchasedSubs
169 |
170 | subscriptionGroupStatus = try? await storeProducts.first?.subscription?.status.first?.state
| |- error: setter for 'subscriptionGroupStatus' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
171 | await updateSubscriptionStatus()
172 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:170:81: error: 'status' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
168 | self.purchasedSubscriptions = purchasedSubs
169 |
170 | subscriptionGroupStatus = try? await storeProducts.first?.subscription?.status.first?.state
| |- error: 'status' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
171 | await updateSubscriptionStatus()
172 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:178:13: error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
174 |
175 | @MainActor
176 | func updateSubscriptionStatus() async {
| `- note: add @available attribute to enclosing instance method
177 | if subscriptionGroupStatus == .subscribed || subscriptionGroupStatus == .inGracePeriod {
178 | isSubscribed = true
| |- error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
179 | } else {
180 | isSubscribed = false
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:180:13: error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
174 |
175 | @MainActor
176 | func updateSubscriptionStatus() async {
| `- note: add @available attribute to enclosing instance method
177 | if subscriptionGroupStatus == .subscribed || subscriptionGroupStatus == .inGracePeriod {
178 | isSubscribed = true
179 | } else {
180 | isSubscribed = false
| |- error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
181 | }
182 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:186:43: error: conformance of 'Product' to 'Equatable' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
182 | }
183 |
184 | func isProductPurchased(with productId: String) -> Bool {
| `- note: add @available attribute to enclosing instance method
185 | if let product = storeProducts.first(where: {$0.id == productId}) {
186 | return purchasedSubscriptions.contains(product)
| |- error: conformance of 'Product' to 'Equatable' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
187 | }
188 | return false
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:193:16: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
194 | for await result in Transaction.updates {
195 | do {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:193:21: error: 'detached(priority:operation:)' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
| |- error: 'detached(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
194 | for await result in Transaction.updates {
195 | do {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:194:45: error: 'updates' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
194 | for await result in Transaction.updates {
| |- error: 'updates' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
195 | do {
196 | let transaction = try result.payloadValue
[15/16] Compiling IosIapStore RootStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Services/SubscriptionPlanService.swift:16:57: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
8 | import Foundation
9 |
10 | struct SubscriptionPlanService {
| `- note: add @available attribute to enclosing struct
11 | func loadSubscriptionPlans(apiKey: String) async throws -> [SubscriptionPlan] {
| `- note: add @available attribute to enclosing instance method
12 | do {
13 | let url = URL(string: "https://05052a84-35de-4a87-ae64-2b32a9188b68.mock.pstmn.io/productDetails")!
14 | var request = URLRequest(url: url)
15 | request.setValue(apiKey, forHTTPHeaderField: "Authorization")
16 | let (data, _) = try await URLSession.shared.data(for: request)
| |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
17 | let plans = try JSONDecoder().decode([SubscriptionPlan].self, from: data)
18 | return plans
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Services/SubscriptionPlanService.swift:45:51: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
8 | import Foundation
9 |
10 | struct SubscriptionPlanService {
| `- note: add @available attribute to enclosing struct
11 | func loadSubscriptionPlans(apiKey: String) async throws -> [SubscriptionPlan] {
12 | do {
:
22 | }
23 |
24 | func sendVerifiedCheck(transaction: TransactionDetails, apiKey: String) async throws {
| `- note: add @available attribute to enclosing instance method
25 | let urlString = "https://05052a84-35de-4a87-ae64-2b32a9188b68.mock.pstmn.io/transaction"
26 | let url = URL(string: urlString)
:
43 | // Set the HTTP body to the encoded JSON
44 | request.httpBody = jsonData
45 | let (data, _) = try await session.data(for: request);
| |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
46 | print("Post API response = \(data)")
47 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:15:34: error: 'Transaction' is only available in macOS 12.0 or newer
13 | }
14 |
15 | typealias Transaction = StoreKit.Transaction
| | `- error: 'Transaction' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:16:34: error: 'Product' is only available in macOS 12.0 or newer
14 |
15 | typealias Transaction = StoreKit.Transaction
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:17:35: error: 'Product' is only available in macOS 12.0 or newer
15 | typealias Transaction = StoreKit.Transaction
16 | typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
| | `- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add @available attribute to enclosing type alias
18 |
19 | class RootStore: ObservableObject {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:20:6: error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
| `- error: 'init(wrappedValue:_:store:)' is only available in macOS 11.0 or newer
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:20:6: error: 'AppStorage' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
| `- error: 'AppStorage' is only available in macOS 11.0 or newer
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:21:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:22:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
| `- error: 'Published' is only available in macOS 10.15 or newer
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:23:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
| `- error: 'Published' is only available in macOS 10.15 or newer
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:24:49: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
| `- error: 'Product' is only available in macOS 12.0 or newer
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:24:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
22 | @Published var isLoading = true
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:25:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
23 | @Published var errorMessage: String?
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
| `- error: 'Published' is only available in macOS 10.15 or newer
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:26:58: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
| `- error: 'Product' is only available in macOS 12.0 or newer
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:26:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
24 | @Published private(set) var storeProducts: [Product] = []
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:27:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
25 | @Published var selectedProduct: SubscriptionPlan?
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
28 | @Published private(set) var productIds: [String] = []
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:28:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
26 | @Published private(set) var purchasedSubscriptions: [Product] = []
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
30 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:29:6: error: 'Published' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
27 | @Published private(set) var availableProducts: [SubscriptionPlan] = []
28 | @Published private(set) var productIds: [String] = []
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
| `- error: 'Published' is only available in macOS 10.15 or newer
30 |
31 | var updateListenerTask: Task<Void, Error>? = nil
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:31:29: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
29 | @Published private(set) var subscriptionGroupStatus: RenewalState?
30 |
31 | var updateListenerTask: Task<Void, Error>? = nil
| `- error: 'Task' is only available in macOS 10.15 or newer
32 |
33 | let sk2Store = SKProductStore()
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:191:37: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| | `- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:19:18: error: 'ObservableObject' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [SubscriptionPlan]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [SubscriptionPlan]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, Bool> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, Bool>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, String?> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, String?>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [Product]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [Product]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, SubscriptionPlan?> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, SubscriptionPlan?>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [Product]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [Product]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [SubscriptionPlan]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [SubscriptionPlan]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, [String]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<RootStore, [String]>'
<unknown>:0: error: cannot convert value of type 'any KeyPath<RootStore, RenewalState?> & Sendable' (aka 'any KeyPath<RootStore, Optional<Product.SubscriptionInfo.RenewalState>> & Sendable') to expected argument type 'ReferenceWritableKeyPath<RootStore, RenewalState?>' (aka 'ReferenceWritableKeyPath<RootStore, Optional<Product.SubscriptionInfo.RenewalState>>')
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:45:29: error: 'cancel()' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
43 | }
44 | deinit {
45 | updateListenerTask?.cancel()
| |- error: 'cancel()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
46 | }
47 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:50:9: error: setter for 'availableProducts' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
47 |
48 | @MainActor
49 | private func updateAvaiableProducts() {
| `- note: add @available attribute to enclosing instance method
50 | availableProducts = apiSubscriptionPlans.filter { plan in
| |- error: setter for 'availableProducts' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
51 | storeProducts.contains { $0.id == plan.productId }
52 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:56:9: error: setter for 'productIds' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
53 | }
54 | @MainActor
55 | private func updateProductIds() {
| `- note: add @available attribute to enclosing instance method
56 | productIds = apiSubscriptionPlans.map { $0.productId };
| |- error: setter for 'productIds' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | }
58 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:63:13: error: setter for 'apiSubscriptionPlans' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
59 |
60 | @MainActor
61 | func fetchSubscriptionPlans(apiKey: String) async {
| `- note: add @available attribute to enclosing instance method
62 | do {
63 | self.apiSubscriptionPlans = try await subscriptionPlanService.loadSubscriptionPlans(apiKey: apiKey)
| |- error: setter for 'apiSubscriptionPlans' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | print("fetchSubscriptionPlans = \(apiSubscriptionPlans.count)")
65 | self.updateProductIds();
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:67:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
59 |
60 | @MainActor
61 | func fetchSubscriptionPlans(apiKey: String) async {
| `- note: add @available attribute to enclosing instance method
62 | do {
63 | self.apiSubscriptionPlans = try await subscriptionPlanService.loadSubscriptionPlans(apiKey: apiKey)
:
65 | self.updateProductIds();
66 | } catch {
67 | self.errorMessage = "Failed to load subscription plans: \(error.localizedDescription)"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
68 | self.isLoading = false
69 | print("fetchSubscriptionPlans - \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:68:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
59 |
60 | @MainActor
61 | func fetchSubscriptionPlans(apiKey: String) async {
| `- note: add @available attribute to enclosing instance method
62 | do {
63 | self.apiSubscriptionPlans = try await subscriptionPlanService.loadSubscriptionPlans(apiKey: apiKey)
:
66 | } catch {
67 | self.errorMessage = "Failed to load subscription plans: \(error.localizedDescription)"
68 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
69 | print("fetchSubscriptionPlans - \(error)")
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:76:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
77 | self.isLoading = false
78 | return
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:77:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
77 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
78 | return
79 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:83:13: error: setter for 'storeProducts' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
81 | do {
82 | let sk2Products = try await sk2Store.fetchProductsFromAppStore(for: productIds)
83 | storeProducts = sk2Products
| |- error: setter for 'storeProducts' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
84 | print("fetchStoreProducts = \(sk2Products.count)")
85 | self.updateAvaiableProducts();
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:86:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
84 | print("fetchStoreProducts = \(sk2Products.count)")
85 | self.updateAvaiableProducts();
86 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
87 | } catch StoreError.noProductsInStore {
88 | let errMsg = "Got 0 products in App store."
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:89:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
87 | } catch StoreError.noProductsInStore {
88 | let errMsg = "Got 0 products in App store."
89 | errorMessage = errMsg
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
90 | self.isLoading = false
91 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:90:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
88 | let errMsg = "Got 0 products in App store."
89 | errorMessage = errMsg
90 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
91 | } catch {
92 | let errMsg = "Failed to fetch App Store products: \(error.localizedDescription)"
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:93:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
91 | } catch {
92 | let errMsg = "Failed to fetch App Store products: \(error.localizedDescription)"
93 | errorMessage = errMsg
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | print("fetchStoreProducts - \(error)")
95 | self.isLoading = false
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:95:13: error: setter for 'isLoading' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
72 |
73 | @MainActor
74 | func fetchStoreProducts() async {
| `- note: add @available attribute to enclosing instance method
75 | if(productIds.isEmpty) {
76 | errorMessage = "No Products Ids available."
:
93 | errorMessage = errMsg
94 | print("fetchStoreProducts - \(error)")
95 | self.isLoading = false
| |- error: setter for 'isLoading' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
96 | }
97 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:102:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
103 | return
104 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:106:44: error: 'purchase(options:)' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
104 | }
105 | do {
106 | let result = try await product.purchase()
| |- error: 'purchase(options:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
107 | // print("purchaseProduct result - \(result)")
108 | switch result {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:117:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
115 |
116 | await transaction.finish()
117 | errorMessage = nil
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
118 | case .userCancelled:
119 | errorMessage = "User cancelled the purchase"
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:119:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
117 | errorMessage = nil
118 | case .userCancelled:
119 | errorMessage = "User cancelled the purchase"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 |
121 | case .pending:
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:122:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
120 |
121 | case .pending:
122 | errorMessage = "Purchase is pending"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
123 |
124 | default:
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:125:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
123 |
124 | default:
125 | errorMessage = "Unknown purchase result"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
126 |
127 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:129:13: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
98 |
99 | @MainActor
100 | func purchaseProduct(with productId: String) async {
| `- note: add @available attribute to enclosing instance method
101 | guard let product = storeProducts.first(where: { $0.id == productId }) else {
102 | errorMessage = "Product not found in App Store"
:
127 | }
128 | } catch {
129 | errorMessage = "Purchase failed: \(error.localizedDescription)"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | }
131 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:136:29: error: 'Product' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
| |- error: 'Product' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
137 |
138 | var latestTransactions: [String: Transaction] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:140:41: error: 'currentEntitlements' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
138 | var latestTransactions: [String: Transaction] = [:]
139 |
140 | for await result in Transaction.currentEntitlements {
| |- error: 'currentEntitlements' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
141 | do{
142 | let transaction = try sk2Store.checkVerified(result)
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:158:17: error: setter for 'errorMessage' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
156 | }
157 | } catch {
158 | errorMessage = "Could not find products. \(error.localizedDescription)"
| |- error: setter for 'errorMessage' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
159 | }
160 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:168:9: error: setter for 'purchasedSubscriptions' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
166 | }
167 |
168 | self.purchasedSubscriptions = purchasedSubs
| |- error: setter for 'purchasedSubscriptions' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
169 |
170 | subscriptionGroupStatus = try? await storeProducts.first?.subscription?.status.first?.state
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:170:9: error: setter for 'subscriptionGroupStatus' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
168 | self.purchasedSubscriptions = purchasedSubs
169 |
170 | subscriptionGroupStatus = try? await storeProducts.first?.subscription?.status.first?.state
| |- error: setter for 'subscriptionGroupStatus' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
171 | await updateSubscriptionStatus()
172 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:170:81: error: 'status' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
133 |
134 | @MainActor
135 | func updateCustomerProductStatus() async {
| `- note: add @available attribute to enclosing instance method
136 | var purchasedSubs: [Product] = []
137 |
:
168 | self.purchasedSubscriptions = purchasedSubs
169 |
170 | subscriptionGroupStatus = try? await storeProducts.first?.subscription?.status.first?.state
| |- error: 'status' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
171 | await updateSubscriptionStatus()
172 |
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:178:13: error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
174 |
175 | @MainActor
176 | func updateSubscriptionStatus() async {
| `- note: add @available attribute to enclosing instance method
177 | if subscriptionGroupStatus == .subscribed || subscriptionGroupStatus == .inGracePeriod {
178 | isSubscribed = true
| |- error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
179 | } else {
180 | isSubscribed = false
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:180:13: error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
174 |
175 | @MainActor
176 | func updateSubscriptionStatus() async {
| `- note: add @available attribute to enclosing instance method
177 | if subscriptionGroupStatus == .subscribed || subscriptionGroupStatus == .inGracePeriod {
178 | isSubscribed = true
179 | } else {
180 | isSubscribed = false
| |- error: setter for 'isSubscribed' is only available in macOS 11.0 or newer
| `- note: add 'if #available' version check
181 | }
182 | }
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:186:43: error: conformance of 'Product' to 'Equatable' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
182 | }
183 |
184 | func isProductPurchased(with productId: String) -> Bool {
| `- note: add @available attribute to enclosing instance method
185 | if let product = storeProducts.first(where: {$0.id == productId}) {
186 | return purchasedSubscriptions.contains(product)
| |- error: conformance of 'Product' to 'Equatable' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
187 | }
188 | return false
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:193:16: error: 'Task' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
194 | for await result in Transaction.updates {
195 | do {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:193:21: error: 'detached(priority:operation:)' is only available in macOS 10.15 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
| |- error: 'detached(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
194 | for await result in Transaction.updates {
195 | do {
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Utilities/RootStore.swift:194:45: error: 'updates' is only available in macOS 12.0 or newer
17 | typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState
18 |
19 | class RootStore: ObservableObject {
| `- note: add @available attribute to enclosing class
20 | @AppStorage("subscribed") private var isSubscribed: Bool = false
21 | @Published var apiSubscriptionPlans: [SubscriptionPlan] = []
:
189 | }
190 |
191 | func listenForTransactions() -> Task<Void, Error> {
| `- note: add @available attribute to enclosing instance method
192 | print("listenForTransactions")
193 | return Task.detached {
194 | for await result in Transaction.updates {
| |- error: 'updates' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
195 | do {
196 | let transaction = try result.payloadValue
[16/16] Compiling IosIapStore resource_bundle_accessor.swift
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/Users/admin/builder/spi-builder-workspace/Sources/IosIapStore/Others/Media.xcassets
BUILD FAILURE 6.2 macosSpm