diff --git a/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/App/CartManager.swift b/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/App/CartManager.swift index de959554..1af9ee47 100644 --- a/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/App/CartManager.swift +++ b/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/App/CartManager.swift @@ -53,10 +53,10 @@ class CartManager: ObservableObject { init() {} public func preloadCheckout() { - if let url = cart?.checkoutURL, isDirty { - ShopifyCheckoutKit.preload(checkout: url) - markCartAsReady() - } + // if let url = cart?.checkoutURL, isDirty { + // ShopifyCheckoutKit.preload(checkout: url) + // markCartAsReady() + // } } func markCartAsReady() { diff --git a/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartView.swift b/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartView.swift index ecb48075..92a92e92 100644 --- a/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartView.swift +++ b/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartView.swift @@ -275,9 +275,9 @@ struct CartLines: View { CartManager.shared.cart = cart updating = nil - if let checkoutUrl = cart.checkoutURL { - ShopifyCheckoutKit.preload(checkout: checkoutUrl) - } + // if let checkoutUrl = cart.checkoutURL { + // ShopifyCheckoutKit.preload(checkout: checkoutUrl) + // } } }, label: { diff --git a/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartViewController.swift b/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartViewController.swift index d4a1e012..4c44c8d1 100644 --- a/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartViewController.swift +++ b/platforms/swift/Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Scenes/Cart/CartViewController.swift @@ -339,9 +339,9 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData tableView.reloadData() - if let url = CartManager.shared.cart?.checkoutURL { - ShopifyCheckoutKit.preload(checkout: url) - } + // if let url = CartManager.shared.cart?.checkoutURL { + // ShopifyCheckoutKit.preload(checkout: url) + // } } // MARK: UITableViewDataSource @@ -375,9 +375,9 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData self.setupCheckoutButtonContent() cell.quantityLabel.text = "\(cart.lines.nodes[indexPath.item].quantity)" - if let checkoutUrl = cart.checkoutURL { - ShopifyCheckoutKit.preload(checkout: checkoutUrl) - } + // if let checkoutUrl = cart.checkoutURL { + // ShopifyCheckoutKit.preload(checkout: checkoutUrl) + // } } } return cell diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift b/platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift index b6da73a9..599a7a2d 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift @@ -46,8 +46,8 @@ public func configure(_ block: (inout Configuration) -> Void) { block(&configuration) } -/// Preloads the checkout for faster presentation. -public func preload(checkout url: URL) { +/// Public preload support is coming soon. +internal func preload(checkout url: URL) { guard configuration.preloading.enabled else { return }