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
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