Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ protocol PaymentAuthorizationController {
extension PKPaymentAuthorizationController: PaymentAuthorizationController {}

@available(iOS 16.0, *)
typealias PKAuthorizationControllerFactory = @MainActor (PKPaymentRequest) -> any PaymentAuthorizationController
typealias PKAuthorizationControllerFactory = @MainActor @Sendable (PKPaymentRequest) -> any PaymentAuthorizationController

@available(iOS 16.0, *)
@MainActor
class ApplePayAuthorizationDelegate: NSObject, ObservableObject {
class ApplePayAuthorizationDelegate: NSObject, ObservableObject, @unchecked Sendable {
let configuration: ApplePayConfigurationWrapper
let abortError = ShopifyAcceleratedCheckouts.Error.invariant(expected: "cart")
var controller: PayController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protocol PayController: AnyObject {

@available(iOS 16.0, *)
@MainActor
class ApplePayViewController: WalletController, PayController {
class ApplePayViewController: WalletController, PayController, @unchecked Sendable {
@Published var paymentController: PKPaymentAuthorizationController?

var cart: StorefrontAPI.Types.Cart?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI

@available(iOS 16.0, *)
@MainActor
class ShopPayViewController: WalletController {
class ShopPayViewController: WalletController, @unchecked Sendable {
var eventHandlers: EventHandlers
var client: (any CheckoutCommunicationProtocol)?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI

@available(iOS 16.0, *)
@MainActor
class WalletController: ObservableObject {
class WalletController: ObservableObject, @unchecked Sendable {
@Published var identifier: CheckoutIdentifier
@Published var storefront: StorefrontAPIProtocol
@Published var checkoutViewController: CheckoutViewController?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit

public struct Platform: Equatable {
public struct Platform: Equatable, Sendable {
public let identifier: String
public let version: String?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import os.log
import XCTest

@available(iOS 17.0, *)
@MainActor
class ShopifyAcceleratedCheckoutsTests: XCTestCase {
var originalLogLevel: LogLevel!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class CheckoutViewControllerTests: XCTestCase {
var checkoutURL: URL!
var checkoutViewController: CheckoutViewController!

override func setUp() {
super.setUp()
override func setUp() async throws {
try await super.setUp()
checkoutURL = URL(string: "https://www.shopify.com")
checkoutViewController = CheckoutViewController(checkout: checkoutURL)
}
Expand All @@ -22,8 +22,8 @@ class ShopifyCheckoutTests: XCTestCase {
var checkoutURL: URL!
var shopifyCheckout: ShopifyCheckout!

override func setUp() {
super.setUp()
override func setUp() async throws {
try await super.setUp()
checkoutURL = URL(string: "https://www.shopify.com")
shopifyCheckout = ShopifyCheckout(checkout: checkoutURL)
}
Expand Down Expand Up @@ -65,8 +65,8 @@ class CheckoutConfigurableTests: XCTestCase {
var checkoutURL: URL!
var shopifyCheckout: ShopifyCheckout!

override func setUp() {
super.setUp()
override func setUp() async throws {
try await super.setUp()
checkoutURL = URL(string: "https://www.shopify.com")
shopifyCheckout = ShopifyCheckout(checkout: checkoutURL)
}
Expand Down
17 changes: 17 additions & 0 deletions platforms/swift/api/ShopifyCheckoutKit.json
Original file line number Diff line number Diff line change
Expand Up @@ -2628,6 +2628,20 @@
"usr": "s:SQ",
"mangledName": "$sSQ"
},
{
"kind": "Conformance",
"name": "Sendable",
"printedName": "Sendable",
"usr": "s:s8SendableP",
"mangledName": "$ss8SendableP"
},
{
"kind": "Conformance",
"name": "SendableMetatype",
"printedName": "SendableMetatype",
"usr": "s:s16SendableMetatypeP",
"mangledName": "$ss16SendableMetatypeP"
},
{
"kind": "Conformance",
"name": "Copyable",
Expand Down Expand Up @@ -5353,6 +5367,9 @@
"usr": "s:18ShopifyCheckoutKit13configurationAA13ConfigurationVvp",
"mangledName": "$s18ShopifyCheckoutKit13configurationAA13ConfigurationVvp",
"moduleName": "ShopifyCheckoutKit",
"declAttributes": [
"Nonisolated"
],
"accessors": [
{
"kind": "Accessor",
Expand Down
125 changes: 88 additions & 37 deletions platforms/swift/api/ShopifyCheckoutProtocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -66404,43 +66404,6 @@
],
"funcSelfKind": "NonMutating"
},
{
"kind": "Var",
"name": "hashValue",
"printedName": "hashValue",
"children": [
{
"kind": "TypeNominal",
"name": "Int",
"printedName": "Swift.Int",
"usr": "s:Si"
}
],
"declKind": "Var",
"usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp",
"mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp",
"moduleName": "ShopifyCheckoutProtocol",
"accessors": [
{
"kind": "Accessor",
"name": "Get",
"printedName": "Get()",
"children": [
{
"kind": "TypeNominal",
"name": "Int",
"printedName": "Swift.Int",
"usr": "s:Si"
}
],
"declKind": "Accessor",
"usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg",
"mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg",
"moduleName": "ShopifyCheckoutProtocol",
"accessorKind": "get"
}
]
},
{
"kind": "Function",
"name": "hash",
Expand All @@ -66463,6 +66426,9 @@
"usr": "s:23ShopifyCheckoutProtocol8JSONNullC4hash4intoys6HasherVz_tF",
"mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC4hash4intoys6HasherVz_tF",
"moduleName": "ShopifyCheckoutProtocol",
"declAttributes": [
"Final"
],
"funcSelfKind": "NonMutating"
},
{
Expand Down Expand Up @@ -66532,14 +66498,65 @@
"usr": "s:23ShopifyCheckoutProtocol8JSONNullC6encode2toys7Encoder_p_tKF",
"mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC6encode2toys7Encoder_p_tKF",
"moduleName": "ShopifyCheckoutProtocol",
"declAttributes": [
"Final"
],
"throwing": true,
"funcSelfKind": "NonMutating"
},
{
"kind": "Var",
"name": "hashValue",
"printedName": "hashValue",
"children": [
{
"kind": "TypeNominal",
"name": "Int",
"printedName": "Swift.Int",
"usr": "s:Si"
}
],
"declKind": "Var",
"usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp",
"mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp",
"moduleName": "ShopifyCheckoutProtocol",
"implicit": true,
"declAttributes": [
"Final"
],
"accessors": [
{
"kind": "Accessor",
"name": "Get",
"printedName": "Get()",
"children": [
{
"kind": "TypeNominal",
"name": "Int",
"printedName": "Swift.Int",
"usr": "s:Si"
}
],
"declKind": "Accessor",
"usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg",
"mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg",
"moduleName": "ShopifyCheckoutProtocol",
"implicit": true,
"declAttributes": [
"Final"
],
"accessorKind": "get"
}
]
}
],
"declKind": "Class",
"usr": "s:23ShopifyCheckoutProtocol8JSONNullC",
"mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC",
"moduleName": "ShopifyCheckoutProtocol",
"declAttributes": [
"Final"
],
"conformances": [
{
"kind": "Conformance",
Expand All @@ -66562,13 +66579,27 @@
"usr": "s:SH",
"mangledName": "$sSH"
},
{
"kind": "Conformance",
"name": "Sendable",
"printedName": "Sendable",
"usr": "s:s8SendableP",
"mangledName": "$ss8SendableP"
},
{
"kind": "Conformance",
"name": "Equatable",
"printedName": "Equatable",
"usr": "s:SQ",
"mangledName": "$sSQ"
},
{
"kind": "Conformance",
"name": "SendableMetatype",
"printedName": "SendableMetatype",
"usr": "s:s16SendableMetatypeP",
"mangledName": "$ss16SendableMetatypeP"
},
{
"kind": "Conformance",
"name": "Copyable",
Expand Down Expand Up @@ -66685,6 +66716,9 @@
"usr": "s:23ShopifyCheckoutProtocol7JSONAnyC6encode2toys7Encoder_p_tKF",
"mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC6encode2toys7Encoder_p_tKF",
"moduleName": "ShopifyCheckoutProtocol",
"declAttributes": [
"Final"
],
"throwing": true,
"funcSelfKind": "NonMutating"
}
Expand All @@ -66693,6 +66727,9 @@
"usr": "s:23ShopifyCheckoutProtocol7JSONAnyC",
"mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC",
"moduleName": "ShopifyCheckoutProtocol",
"declAttributes": [
"Final"
],
"conformances": [
{
"kind": "Conformance",
Expand All @@ -66708,6 +66745,20 @@
"usr": "s:SE",
"mangledName": "$sSE"
},
{
"kind": "Conformance",
"name": "Sendable",
"printedName": "Sendable",
"usr": "s:s8SendableP",
"mangledName": "$ss8SendableP"
},
{
"kind": "Conformance",
"name": "SendableMetatype",
"printedName": "SendableMetatype",
"usr": "s:s16SendableMetatypeP",
"mangledName": "$ss16SendableMetatypeP"
},
{
"kind": "Conformance",
"name": "Copyable",
Expand Down
Loading