Repository navigation
[Swift][Breaking]: Make the checkout appearance own its native colors - #970
Open
kieran-osgood-shopify wants to merge 1 commit into
Open
kieran-osgood-shopify wants to merge 1 commit into
kieran-osgood-shopify wants to merge 1 commit into
Conversation
Assisted-By: devx/6076b771-cb74-4665-935f-816eba5058f0
Bundle Size Budgets
Bundle and package sizeWeb bundle sizes cover shipped runtime JavaScript. Package sizes cover the full published archive, including any source maps, declarations, and documentation it contains.
How sizes are measuredMeasured from the PR base SHA and PR head SHA. Web bundle rows sum shipped |
Bitrise buildsInstall this buildOpen Tophat, select your target device, then click Install. Links open on the Mac running Tophat.
Checkout Kit E2E results
|
kieran-osgood-shopify
added this pull request to stack #971
October 9, 2026 20:42
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are you making?
Part of https://github.com/shop/issues-checkout-kit/issues/1260
Checkout colors in the Swift SDK now belong to the appearance, matching the Android SDK's
CheckoutAppearance/ColorScheme/Colorsmodel. Before, colors were separate global settings (tintColor,backgroundColor,closeButtonTintColor). Changing the appearance kept whatever colors were set before it, so a checkout could show the background of an earlier scheme.CheckoutAppearance(.app(ColorScheme)/.storefront(colors:)) replacesConfiguration.Appearance.ColorScheme(.light(colors:)/.dark(colors:)/.automatic(lightColors:darkColors:)) replacesConfiguration.ColorScheme.ColorsholdswebViewBackground,headerBackground,headerFont,progressIndicator,closeIcon,closeIconTintandheaderBorderColor, the same fields Android has (Android also hasdragHandleColor)..app(.automatic())after.app(.dark(...))uses the automatic defaults.automatic, the header, title, close button, progress bar and WebView background update when the system appearance changes while checkout is open.storefrontkeeps the checkout light.ShopifyCheckoutSwiftUI.appearance(...)modifier stays instance-scoped, and a reused preloaded WebView takes the colors of the checkout presenting it.Breaking:
Configuration.tintColor,backgroundColorandcloseButtonTintColor, plus the SwiftUI.tintColor,.backgroundColorand.closeButtonTintColormodifiers, are removed.platforms/swift/README.mdhas the migration notes.The React Native bridge that uses this API is #597.
How to test
Run the Swift sample app (
CheckoutKitSwiftDemo) on a simulator, add an item to the cart, and use Settings → Theme to pick the appearance. Toggle the system appearance with ⌘⇧A.GIVEN the appearance is set to App dark
AND the system appearance is light
WHEN the reviewer opens checkout from the cart
THEN the header, title, close button and WebView background should all be dark
GIVEN the appearance was App dark and is then changed to App automatic
AND the system appearance is light
WHEN the reviewer opens checkout from the cart
THEN checkout should be fully light, with no dark background left over from App dark
GIVEN the appearance is set to App automatic
AND checkout is open with the system appearance light
WHEN the reviewer switches the system appearance to dark
THEN the header, title, close button and WebView background should switch to dark without reopening checkout
GIVEN the appearance is set to Storefront
AND the system appearance is dark
WHEN the reviewer opens checkout from the cart
THEN checkout should stay light and show the storefront's branding
Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)