Skip to content

hide communication client#288

Draft
kiftio wants to merge 1 commit into
06-16-remove_buyer_change_in_webfrom
06-16-hide_communication_client
Draft

hide communication client#288
kiftio wants to merge 1 commit into
06-16-remove_buyer_change_in_webfrom
06-16-hide_communication_client

Conversation

@kiftio

@kiftio kiftio commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

PR 2 - make the process method internal.

CheckoutCommunicationClient (Android) and CheckoutCommunicationProtocol (Swift/iOS) were previously public-facing interfaces that merchants could implement directly. This PR narrows their visibility to internal/package, making CheckoutProtocol.Client the sole public API for connecting typed Embedded Checkout Protocol (ECP) handlers.

On Android, CheckoutProtocol.Client no longer implements CheckoutCommunicationClient. Instead, an internal CheckoutProtocolClientAdapter bridges between the two, and an extension function asCommunicationClient() is used at the boundary where the internal interface is required. All public-facing APIs (ShopifyCheckoutKit.present, CheckoutPresentation.connect, CheckoutDialog, CheckoutWebView) now accept CheckoutProtocol.Client directly.

On Swift/iOS, CheckoutCommunicationProtocol is demoted to package visibility. The public present(checkout:from:delegate:client:) function and CheckoutViewController.init, ShopifyCheckout.connect, and AcceleratedCheckoutButtons.connect now accept CheckoutProtocol.Client directly. A package-scoped overload of present and connect retaining the any CheckoutCommunicationProtocol signature is preserved for internal use (e.g. the React Native bridge). The CocoaPods ProtocolRelay retroactive conformance of CheckoutProtocol.Client to CheckoutCommunicationProtocol is removed since it is no longer needed.

How to test

  1. Verify that passing a CheckoutProtocol.Client to ShopifyCheckoutKit.present (Android) and present(checkout:from:delegate:client:) (iOS) compiles and dispatches typed callbacks correctly.
  2. Confirm that attempting to pass a custom CheckoutCommunicationClient / CheckoutCommunicationProtocol implementation directly to any public API no longer compiles.
  3. Run the existing Android unit tests, including CheckoutPresentationTest and EmbeddedCheckoutProtocolTest, and verify they pass.
  4. Run the React Native ProtocolRelayTest suite and confirm all tests pass using the reflection-based processForTest helper.
  5. On iOS, verify the React Native bridge continues to function via the retained package-scoped overloads.

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 platforms/swift/CHANGELOG.md
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Android version?
  • I have bumped the versionName in platforms/android/lib/build.gradle
  • I have updated platforms/android/CHANGELOG.md
  • 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.

kiftio commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.66% (319/348) 87.86% (181/206) 100% (82/82)

@kiftio kiftio force-pushed the dk/ignore-unknown-messages branch from 7156a26 to b2500fb Compare June 16, 2026 11:51
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 5f3a339 to 57049b1 Compare June 16, 2026 11:51
@kiftio kiftio force-pushed the dk/ignore-unknown-messages branch from b2500fb to b61158a Compare June 16, 2026 12:24
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 57049b1 to 2d9284e Compare June 16, 2026 12:24
@kiftio kiftio mentioned this pull request Jun 16, 2026
11 tasks
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 2d9284e to 98a13f0 Compare June 16, 2026 12:48
@kiftio kiftio force-pushed the dk/ignore-unknown-messages branch from b61158a to 4b0d021 Compare June 16, 2026 12:48
@kiftio kiftio changed the base branch from dk/ignore-unknown-messages to graphite-base/288 June 16, 2026 19:44
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 98a13f0 to 9229144 Compare June 16, 2026 19:44
@kiftio kiftio changed the base branch from graphite-base/288 to 06-16-remove_buyer_change_in_web June 16, 2026 19:44
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 9229144 to ee2237f Compare June 18, 2026 09:06
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch 2 times, most recently from 0ca4dae to af4701b Compare June 18, 2026 10:06
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from ee2237f to 9466b3f Compare June 18, 2026 10:06
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch from af4701b to d611908 Compare June 18, 2026 11:12
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 9466b3f to aa6d082 Compare June 18, 2026 11:12
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch from d611908 to 49334a2 Compare June 18, 2026 13:59
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from aa6d082 to 0481a57 Compare June 18, 2026 13:59
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch from 49334a2 to db8403f Compare June 18, 2026 14:15
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 0481a57 to a5f73e9 Compare June 18, 2026 14:15
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch from db8403f to 46a8945 Compare June 18, 2026 14:54
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from a5f73e9 to 09d712f Compare June 18, 2026 14:54
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch from 46a8945 to a604c76 Compare June 18, 2026 15:01
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 09d712f to 3fafc47 Compare June 18, 2026 15:01
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from 3fafc47 to ea6a28a Compare June 18, 2026 15:23
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch from a604c76 to 2d29352 Compare June 18, 2026 15:23
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from ea6a28a to ed5d329 Compare June 18, 2026 15:45
@kiftio kiftio force-pushed the 06-16-remove_buyer_change_in_web branch 2 times, most recently from 74119ca to 5e62692 Compare June 18, 2026 20:03
@kiftio kiftio force-pushed the 06-16-hide_communication_client branch from ed5d329 to 0bfc1d3 Compare June 18, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant