Skip to content

[Swift] Updates accelerated checkouts to use onDismiss - #486

Merged
kiftio merged 1 commit into
mainfrom
07-16-updates_accelerated_checkouts_to_use_ondismiss
Jul 17, 2026
Merged

[Swift] Updates accelerated checkouts to use onDismiss#486
kiftio merged 1 commit into
mainfrom
07-16-updates_accelerated_checkouts_to_use_ondismiss

Conversation

@kiftio

@kiftio kiftio commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Renames the onCancel / checkoutDidCancel API to onDismiss / checkoutDidDismiss across the Swift platform to better reflect the intent of the callback. "Cancel" implied the buyer actively abandoned the checkout, whereas "dismiss" more accurately describes the action of closing the checkout experience regardless of the reason.

This is a breaking API change that affects:

  • The AcceleratedCheckoutButtons.onCancel(_:) view modifier, renamed to onDismiss(_:)
  • The EventHandlers.checkoutDidCancel property, renamed to checkoutDidDismiss
  • The ApplePayViewController.onCheckoutCancel property, renamed to onCheckoutDismiss
  • All sample apps and tests updated to reflect the new naming

How to test

  1. Integrate AcceleratedCheckoutButtons into a SwiftUI view and attach the .onDismiss { } modifier.
  2. Trigger a checkout flow and dismiss the checkout sheet without completing the purchase.
  3. Confirm the onDismiss closure is invoked and the previous onCancel modifier is no longer available.
  4. Run the full test suite to confirm all renamed callback tests pass.

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 16, 2026

kiftio commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@kiftio kiftio changed the title Updates accelerated checkouts to use onDismiss [Swift] Updates accelerated checkouts to use onDismiss Jul 16, 2026
@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch from e828251 to 1658436 Compare July 16, 2026 12:25
@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch from 39006d4 to 4a5a483 Compare July 16, 2026 12:25
@kiftio
kiftio marked this pull request as ready for review July 16, 2026 12:27
@kiftio
kiftio requested a review from a team as a code owner July 16, 2026 12:27
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.85% (327/356) 87.98% (183/208) 100% (86/86)

@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch from 1658436 to 80afddb Compare July 16, 2026 12:51
@kiftio
kiftio changed the base branch from 07-16-rename_oncancel_to_ondismiss_in_swift_and_android to graphite-base/486 July 17, 2026 12:54
@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch from 80afddb to fde85ba Compare July 17, 2026 13:02
@kiftio
kiftio force-pushed the graphite-base/486 branch from 4a5a483 to 2a90c2d Compare July 17, 2026 13:02
@kiftio
kiftio changed the base branch from graphite-base/486 to 07-16-rename_oncancel_to_ondismiss_in_swift_and_android July 17, 2026 13:02
@bitrise

bitrise Bot commented Jul 17, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
Swift Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
tests/shared/launch-smoke.yaml swift ios latest iPhone 15
iOS 27 Beta

@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch from fde85ba to 2006fbd Compare July 17, 2026 13:14
@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch from 2a90c2d to 79ed94c Compare July 17, 2026 13:24
@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch 2 times, most recently from b179be8 to 9165564 Compare July 17, 2026 14:51
@kiftio
kiftio force-pushed the 07-16-rename_oncancel_to_ondismiss_in_swift_and_android branch from 79ed94c to 5f70cee Compare July 17, 2026 14:51

kiftio commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 17, 4:08 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 17, 4:10 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 17, 4:26 PM UTC: @kiftio merged this pull request with Graphite.

@kiftio
kiftio changed the base branch from 07-16-rename_oncancel_to_ondismiss_in_swift_and_android to graphite-base/486 July 17, 2026 16:08
@kiftio
kiftio changed the base branch from graphite-base/486 to main July 17, 2026 16:08
@kiftio
kiftio force-pushed the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch from 9165564 to d445766 Compare July 17, 2026 16:09
@kiftio
kiftio merged commit fecb10d into main Jul 17, 2026
35 checks passed
@kiftio
kiftio deleted the 07-16-updates_accelerated_checkouts_to_use_ondismiss branch July 17, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants