Repository navigation
[Swift] 4.0.0 #1016
markmur
announced in
Announcements
[Swift] 4.0.0
#1016
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🎉 Checkout Kit 4.0.0 for Swift is here!
This is a major milestone: the first stable release of Checkout Kit for Swift, the successor to Checkout Sheet Kit. Bring Shopify checkout into your app with your store's branding, Checkout UI extensions, Shopify Functions, and supported payment methods intact.
Built on the Embedded Checkout Protocol, 4.0.0 brings typed checkout events, flexible UIKit and SwiftUI presentation, observable preloading, and deeper control over appearance and navigation. The package also includes Shop Pay and Apple Pay buttons through
ShopifyAcceleratedCheckouts—with your app in control of the cart.Thank you to everyone who tried the SDK, reported issues, and helped shape this release. We're excited to see what you build! 🚀
Explore the Checkout Kit documentation and the Swift integration guide.
Install with Swift Package Manager:
Add
ShopifyCheckoutKitto your app target, and optionallyShopifyAcceleratedCheckoutsfor accelerated checkout buttons. Requires Swift tools 6.0+ and iOS 15+; accelerated checkout buttons require iOS 16+.Breaking changes
Move lifecycle calls to
ShopifyCheckout. The old lifecycle entry points have been removed; yourimport ShopifyCheckoutKitstays the same.ShopifyCheckout.configurationand make shared changes with the main-actorShopifyCheckout.configure { ... }API. UseCheckoutAppearance,CheckoutColorScheme, andCheckoutColorsin place of the old nested appearance types and configuration-level color properties. Shared configuration changes invalidate preloads; preload again afterward. SwiftUI.appearance(...)and.title(...)overrides apply only to that checkout instance.webViewBackground→webViewBackgroundColor,headerBackground→headerBackgroundColor,headerFont→headerTitleColor,progressIndicator→progressIndicatorColor, andcloseIconTint→closeIconTintColor, including initializer labels.closeIconandheaderBorderColorare unchanged.ShopifyAcceleratedCheckoutButtons(variantID:quantity:)with an existingcartIDor the newvariantID:getCart:initializer. Your app creates or reuses the cart after the buyer selects a wallet; see the cart-provider example.with { ... }for modified copies. Protocol values such as checkout status and message severity, and theWallettype, are extensible values. Include adefaultcase when switching over them..idlewith.idle()and.expiredwith.idle(reason: .expired). Invalidation reports.idle(reason: .invalidated); operational failures remain.failed(reason:message:).CheckoutLinkAction.openwith.default. When migrating a delegate fromcheckoutDidFail(error:), implementcheckoutDidFail(_ event: CheckoutFailureEvent)and readevent.error.Additive changes
ShopifyCheckout.present, or hostShopifyCheckoutin your own SwiftUI presentation. Use storefront styling or app-defined light, dark, and automatic appearance palettes.ShopifyAcceleratedCheckoutButtonsto your SwiftUI cart or product experience, with an existing cart or an app-supplied Buy Now cart provider.Behaviour changes
onFail, and accelerated checkout dismissal is reported when the Apple Pay presentation closes.CheckoutSheetandAcceleratedCheckoutButtonsremain deprecated aliases. UseShopifyCheckoutandShopifyAcceleratedCheckoutButtonsin new code.What's Changed
Full Swift changelog: 4.0.0 release details
This discussion was created from the release [Swift] 4.0.0.
All reactions