Skip to content

Fix V4 Apple Pay button customization API#321

Merged
kieran-osgood-shopify merged 1 commit into
mainfrom
v4-apple-pay-equatable-crash
Jun 23, 2026
Merged

Fix V4 Apple Pay button customization API#321
kieran-osgood-shopify merged 1 commit into
mainfrom
v4-apple-pay-equatable-crash

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What?

Ports the relevant Apple Pay customization fix from the legacy V3 checkout sheet kit into the V4 Swift SDK.

  • Replaces the V4 Apple Pay customization API with PassKit-native modifiers:
    • .applePayButtonType(_:)
    • .applePayButtonStyle(_:)
  • Stores and passes PKPaymentButtonType / PKPaymentButtonStyle directly through the Apple Pay button stack.
  • Removes the V3-only SwiftUI wrapper conversion path from V4.
  • Includes the Apple Pay button type in the SwiftUI identity so dynamic type changes recreate the underlying PKPaymentButton.
  • Updates Swift samples, README usage, and the Swift API baseline.

Why?

The V3 patch needed backwards-compatible shims for deprecated Apple Pay customization APIs. V4 does not need that compatibility layer, so this keeps only the V4-relevant fix: using native PassKit values directly and ensuring the button identity reflects both style and type.

Validation

  • shadowenv exec -- env CURRENT_SIMULATOR_UUID=E8D7913B-0229-4D36-9B22-455726BEDA9E /opt/dev/bin/dev swift test ApplePayButtonCustomizationTests
  • shadowenv exec -- /opt/dev/bin/dev swift api check
  • shadowenv exec -- /opt/dev/bin/dev swift lint
  • shadowenv exec -- env CURRENT_SIMULATOR_UUID=E8D7913B-0229-4D36-9B22-455726BEDA9E /opt/dev/bin/dev swift test
  • shadowenv exec -- env CURRENT_SIMULATOR_UUID=E8D7913B-0229-4D36-9B22-455726BEDA9E /opt/dev/bin/dev swift build packages
  • Branch-built iOS sample smoke with agent-device: built and installed CheckoutKitSwiftDemo.app, opened first product, verified enabled/hittable Buy with Apple Pay button rendered.

Smoke screenshot saved locally at /tmp/checkout-kit-agent-device/v4-checkoutkit-demo-apple-pay-product.png.

Copy link
Copy Markdown
Contributor Author

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

@kieran-osgood-shopify kieran-osgood-shopify changed the title Fix Apple Pay button customization API Fix V4 Apple Pay button customization API Jun 23, 2026
@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as ready for review June 23, 2026 11:48
@kieran-osgood-shopify kieran-osgood-shopify requested a review from a team as a code owner June 23, 2026 11:48
@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)

@kieran-osgood-shopify kieran-osgood-shopify merged commit d32973e into main Jun 23, 2026
49 checks passed
@kieran-osgood-shopify kieran-osgood-shopify deleted the v4-apple-pay-equatable-crash branch June 23, 2026 17:04
@markmur markmur added the #gsd:50662 Rebase Checkout Kit on UCP label Jun 24, 2026
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