You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes a bug in swifts preload cache invalidation after configuration changes, as well as aligns the implementation otherwise to Kotlins
Details
I observed a fork in behaviour between Swift and Kotlin
Kotlin discards the CheckoutWebView cache on each configuration change (ShopifyCheckoutKit.configure {})
Swift only invalidated after configuration changes if preloading had changed
Thats the divergent behaviour
The bug is that other properties in configuration drive behaviour of preload, not responding to these means the preload is actually stale
appearance (visual)
platform (drives user agent)
Approach Rationale
I considered updating the swift side to additionally check for appearance and storefront changes to keep this atomic, however opted to match to kotlins for these reason:
Documenting this behaviour for consumers is easier: "ShopifyCheckoutKit.configure {} calls / direct mutation via ShopifyCheckoutKit.configuration will always discard preloaded checkouts"
Avoids stale case bug where we add another property to configuration that preload relies on and isn't keyed on for invalidation
kieran-osgood-shopify
changed the title
fix: discard preload cache on swift configuration changes
Swift/Kotlin alignment: discard preload cache on swift configuration changes
Aug 19, 2026
kieran-osgood-shopify
changed the title
Swift/Kotlin alignment: discard preload cache on swift configuration changes
Swift/Kotlin alignment: discard preload cache on configuration changes
Aug 19, 2026
Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.
These E2E checks are not yet required, so they do not block merging — but a failure may still indicate a real issue to resolve before merging.
If you believe an assertion is flaky, please raise a ticket in the #checkout-kit-devs channel so it can be addressed.
BrowserStack artifacts require BrowserStack access. Sign in to BrowserStack App Automate before opening artifact links.
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
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.
TLDR
This PR fixes a bug in swifts preload cache invalidation after configuration changes, as well as aligns the implementation otherwise to Kotlins
Details
I observed a fork in behaviour between Swift and Kotlin
Kotlin discards the CheckoutWebView cache on each configuration change (
ShopifyCheckoutKit.configure {})Swift only invalidated after configuration changes if
preloadinghad changedThats the divergent behaviour
The bug is that other properties in configuration drive behaviour of preload, not responding to these means the preload is actually stale
appearance(visual)platform(drives user agent)Approach Rationale
I considered updating the swift side to additionally check for appearance and storefront changes to keep this atomic, however opted to match to kotlins for these reason:
ShopifyCheckoutKit.configure {}calls / direct mutation viaShopifyCheckoutKit.configurationwill always discard preloaded checkouts"Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/README.md(major version only)Releasing a new Embedded Checkout Protocol version?
embeddedCheckoutProtocolAndroidinplatforms/android/gradle/libs.versions.tomlprotocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiif the public API changedReleasing a new Android version?
checkoutKitAndroidinplatforms/android/gradle/libs.versions.tomlplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.