Repository navigation
feat(ios): add four Apple Pay button types - #121
Conversation
Add plain, checkout, subscribe and inStore to ApplePayButtonType and map them to PKPaymentButtonType. Regenerated Nitro bindings; Nitrogen reorders GooglePayButtonType's generated enum because the shared literals are now seen first in the Apple spec. Fixes #80
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
@CodeRabbit review |
Action not completed
|
|
@coderabbitai full review |
Action performed
|
Summary
plain,checkout,subscribeandinStoretoApplePayButtonType, so all 17PKPaymentButtonTypevalues are covered. Subscription apps now have a matching button..plain,.checkout,.subscribeand.inStoreinApplePayButtonFactory.mapButtonType. All exist since iOS 12, below the library's minimum.ApplePayButtonFactoryTests, which checks the mapping for every type and the JS names of the new ones.README.md,docs/docs/api/components.mdanddocs/docs/troubleshooting.md;components.mdnotes thatplainshows only the Apple Pay mark.Fixes #80
Test plan
cd package && bun run typecheckcd package && bun run lintcd package && bun run test:ci(301 passed, after rebasing onmain)cd package && bun run check:docsbun run docs:buildcd package && bun run specs: output matches the commitxcodebuild test ... -scheme NitroPay-Unit-Testson an iOS 26.5 simulator: 143 tests, 0 failures (before the rebase onto feat(android): Google Pay DIRECT tokenization #119/feat(android): request assurance details #120, which only touch Android and TS)cd example && bunx expo run:ios: a temporary screen rendered each new type; all show Apple's label (screenshot below). The temporary screen is not part of this PR../gradlew :gmisoftware_react-native-pay:testDebugUnitTest(not run; no hand-written Kotlin changed, see Risk)cd example && bunx expo run:android(not run; Apple Pay button is iOS-only)Risk
GooglePayButtonTypeenum in C++/Kotlin/JNI (plain,checkout,subscribeandpaychanged their numeric order), because those literals are now seen first in the Apple spec. All generated files are regenerated together, and the Android code and JNI refer to the values by name, so behaviour is unchanged.Notes
plainis "Buy with Apple Pay"; that comes from iOS, not the library.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.