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
feat(RN): Add wiring for protocol events - add ec.start (#170)
### What changes are you making?
Part of the scope of this PR is to add a translation layer between the the core native SDKs and the React native JavaScript runtime.
The models that are generated for Swift and Kotlin automatically camel case at their encode decode boundary, which means the raw json is read as snake case and the Swift and Kotlin properties are then turned into camel case when they are turned back into raw json, they're back in snake_case.
QuickType now generates some functions we can use to convert between the raw snake_case and camelCase
### How to test
<!-- Please outline the steps to test your changes -->
---
### Before you merge
> [!IMPORTANT]
>
> - [ ] I've added tests to support my implementation
> - [ ] I have read and agree with the [Contribution Guidelines](./CONTRIBUTING.md)
> - [ ] I have read and agree with the [Code of Conduct](./CODE_OF_CONDUCT.md)
> - [ ] I've updated the relevant platform README (`platforms/swift/README.md` and/or `platforms/android/README.md`)
---
<details>
<summary>Releasing a new Swift version?</summary>
- [ ] 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)
</details>
<details>
<summary>Releasing a new Android version?</summary>
- [ ] 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`
</details>
> [!TIP]
> See the [Contributing documentation](./CONTRIBUTING.md) for the full release process per platform.
Copy file name to clipboardExpand all lines: AGENTS.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,3 +9,56 @@ protocol/ # cross-platform communication layer based on UCP
9
9
e2e/ # cross-platform end-to-end tests
10
10
.github/ # workflows, issue templates, CODEOWNERS
11
11
```
12
+
13
+
## React Native development with local native SDK changes
14
+
15
+
Until the new native SDK libraries have stable released versions, assume React Native validation needs the local native SDK workflow. Use `--local` whenever running the React Native sample or native React Native tests that depend on the in-repo Swift/Kotlin SDKs.
16
+
17
+
Use the React Native `--local` workflow when you need to test React Native against native SDK changes that exist in this repository but have not been released as a SemVer/CocoaPods/Maven version yet.
18
+
19
+
This applies when changes are made under:
20
+
21
+
-`platforms/swift/` — the iOS Swift SDK / CocoaPods sources
22
+
-`platforms/android/` — the Android SDK / Maven artifact sources
23
+
24
+
It does **not** refer to the React Native wrapper platform folders:
- For React Native iOS, `--local` wires CocoaPods to the in-repo `platforms/swift/` sources via a local path instead of a released pod version.
32
+
- For React Native Android, `--local` publishes/uses the in-repo `platforms/android/` SDK through Maven Local so Gradle resolves the local SDK artifact instead of a released Maven version.
33
+
34
+
### When to use it
35
+
36
+
Use `--local` whenever you are validating React Native behavior that depends on unreleased native SDK changes, for example:
37
+
38
+
- a new Swift SDK API that the React Native iOS bridge calls
39
+
- a new Android SDK API that the React Native Android bridge calls
40
+
- generated protocol/model changes under the native SDKs that the React Native module consumes
41
+
- any change in `platforms/swift/` or `platforms/android/` that has not yet been released and consumed through normal dependency versions
42
+
43
+
Re-run the relevant local workflow whenever `platforms/swift/` or `platforms/android/` changes, because the React Native sample/tests need to re-resolve those local native SDK sources/artifacts.
44
+
45
+
```bash
46
+
# iOS sample using local platforms/swift sources
47
+
dev rn ios --local
48
+
49
+
# Android sample using local platforms/android via Maven Local
50
+
dev rn android --local
51
+
52
+
# React Native Android unit tests using local platforms/android via Maven Local
53
+
# `dev rn test android` publishes platforms/android/lib to ~/.m2 first, then runs the RN module tests.
54
+
dev rn test android
55
+
```
56
+
57
+
For ad-hoc Android Gradle test commands, publish the local Android SDK first and set `USE_LOCAL_SDK=1` so the React Native module resolves `com.shopify:checkout-kit:1.0.0` from Maven Local instead of the unreleased placeholder artifact:
0 commit comments