feat(example): validate React Native 0.86#258
Conversation
|
| Filename | Overview |
|---|---|
| .github/workflows/ci.yml | Adds two new CI jobs for RN 0.86 validation; the iOS job contains a stray 'Build example for iOS' step that will always fail because no pod install is run for example/ios in that job. |
| test-projects/rn-purchasely-test/App.tsx | Migrates the demo app to the v6 builder API, adds fullscreen and embedded paywall validation modes; PLYPresentationView is missing flex={1} so the embedded view may render with zero height. |
| test-projects/rn-purchasely-test/package.json | Switches Purchasely dependencies to local file: paths for v6 validation, upgrades to RN 0.86 toolchain, and corrects the brace-expansion override to a resolvable v5.x range. |
| test-projects/rn-purchasely-test/metro.config.js | Adds watchFolders and nodeModulesPaths to let Metro resolve the monorepo local packages referenced via file: dependencies. |
| test-projects/rn-purchasely-test/android/gradle.properties | Enables New Architecture (newArchEnabled=true) for the Android test project. |
| test-projects/rn-purchasely-test/ios/Podfile | Enables RCT_NEW_ARCH_ENABLED=1 at the Podfile level to activate the New Architecture interop path for iOS. |
| test-projects/rn-purchasely-test/android/build.gradle | Bumps compileSdk/targetSdk to 36, Kotlin to 2.3.21, and pins the Kotlin Gradle plugin version explicitly. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
PR[Pull Request / workflow_dispatch] --> Lint[lint job]
PR --> Test[test job]
PR --> BuildAndroid[build-android\nexample app]
PR --> BuildIOS[build-ios\nexample app]
PR --> RN86Android[build-rn-0-86-android\nRN 0.86 test project]
PR --> RN86IOS[build-rn-0-86-ios\nRN 0.86 test project]
BuildAndroid --> GradleCache[Gradle cache\nsetup-gradle + build-cache]
BuildAndroid --> AssembleDebug[assembleDebug]
BuildIOS --> CocoaCache[CocoaPods + DerivedData cache]
BuildIOS --> PodInstallExample[pod install - example/ios]
PodInstallExample --> XcodeBuildExample[xcodebuild Pods-example]
RN86Android --> YarnPrepare1[yarn all:prepare]
YarnPrepare1 --> NpmCI1[npm ci --ignore-scripts]
NpmCI1 --> Gradle86[assembleDebug\nno Gradle cache ⚠️]
RN86IOS --> YarnPrepare2[yarn all:prepare]
YarnPrepare2 --> NpmCI2[npm ci --ignore-scripts]
NpmCI2 --> PodInstallTest[pod install - rn-purchasely-test/ios]
PodInstallTest --> XcodeBuild86[xcodebuild RNPurchaselyTest]
XcodeBuild86 --> BrokenStep[Build example for iOS ❌\nno pod install for example/ios]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
PR[Pull Request / workflow_dispatch] --> Lint[lint job]
PR --> Test[test job]
PR --> BuildAndroid[build-android\nexample app]
PR --> BuildIOS[build-ios\nexample app]
PR --> RN86Android[build-rn-0-86-android\nRN 0.86 test project]
PR --> RN86IOS[build-rn-0-86-ios\nRN 0.86 test project]
BuildAndroid --> GradleCache[Gradle cache\nsetup-gradle + build-cache]
BuildAndroid --> AssembleDebug[assembleDebug]
BuildIOS --> CocoaCache[CocoaPods + DerivedData cache]
BuildIOS --> PodInstallExample[pod install - example/ios]
PodInstallExample --> XcodeBuildExample[xcodebuild Pods-example]
RN86Android --> YarnPrepare1[yarn all:prepare]
YarnPrepare1 --> NpmCI1[npm ci --ignore-scripts]
NpmCI1 --> Gradle86[assembleDebug\nno Gradle cache ⚠️]
RN86IOS --> YarnPrepare2[yarn all:prepare]
YarnPrepare2 --> NpmCI2[npm ci --ignore-scripts]
NpmCI2 --> PodInstallTest[pod install - rn-purchasely-test/ios]
PodInstallTest --> XcodeBuild86[xcodebuild RNPurchaselyTest]
XcodeBuild86 --> BrokenStep[Build example for iOS ❌\nno pod install for example/ios]
Comments Outside Diff (1)
-
.github/workflows/ci.yml, line 209-218 (link)"Build example for iOS" step will always fail in this job
The
build-rn-0-86-iosjob only runspod installfortest-projects/rn-purchasely-test/ios(line 194–195), but this trailing step tries to buildexample/ios/example.xcworkspace— which has no Pods installed anywhere in this job. Xcode will error out because the workspace file won't exist or its resolved pods will be missing. The step should either be removed from this job (the example app is already covered by the existingbuild-iosjob) or a dedicatedpod installforexample/iosmust be added before it.Prompt To Fix With AI
This is a comment left during a code review. Path: .github/workflows/ci.yml Line: 209-218 Comment: **"Build example for iOS" step will always fail in this job** The `build-rn-0-86-ios` job only runs `pod install` for `test-projects/rn-purchasely-test/ios` (line 194–195), but this trailing step tries to build `example/ios/example.xcworkspace` — which has no Pods installed anywhere in this job. Xcode will error out because the workspace file won't exist or its resolved pods will be missing. The step should either be removed from this job (the example app is already covered by the existing `build-ios` job) or a dedicated `pod install` for `example/ios` must be added before it. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
.github/workflows/ci.yml:209-218
**"Build example for iOS" step will always fail in this job**
The `build-rn-0-86-ios` job only runs `pod install` for `test-projects/rn-purchasely-test/ios` (line 194–195), but this trailing step tries to build `example/ios/example.xcworkspace` — which has no Pods installed anywhere in this job. Xcode will error out because the workspace file won't exist or its resolved pods will be missing. The step should either be removed from this job (the example app is already covered by the existing `build-ios` job) or a dedicated `pod install` for `example/ios` must be added before it.
```suggestion
```
### Issue 2 of 3
.github/workflows/ci.yml:142-175
**No Gradle caching in `build-rn-0-86-android`**
The existing `build-android` job uses both `gradle/actions/setup-gradle@v5` (with built-in Gradle cache) and an explicit `actions/cache@v4` for `~/.android/build-cache`. The new `build-rn-0-86-android` job has neither, so it will re-download and recompile Gradle wrapper and all Android dependencies from scratch on every run, significantly increasing CI time.
### Issue 3 of 3
test-projects/rn-purchasely-test/App.tsx:285-288
Add `flex={1}` so the native view fills the 420 pt container; without it the paywall may render as an invisible zero-height region.
```suggestion
<View style={styles.embeddedPaywall}>
<PLYPresentationView
placementId="ONBOARDING"
flex={1}
onPresentationClosed={(result) => {
```
Reviews (1): Last reviewed commit: "ci: allow manual React Native validation" | Re-trigger Greptile
| build-rn-0-86-android: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Build local v6 packages | ||
| run: yarn all:prepare | ||
|
|
||
| - name: Install RN 0.86 test project dependencies | ||
| working-directory: test-projects/rn-purchasely-test | ||
| run: npm ci --ignore-scripts | ||
|
|
||
| - name: Install JDK | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'zulu' | ||
| java-version: '17' | ||
|
|
||
| - name: Set up Android SDK | ||
| uses: android-actions/setup-android@v3 | ||
|
|
||
| - name: Accept Android SDK licenses | ||
| run: yes | sdkmanager --licenses | ||
|
|
||
| - name: Install Android SDK build requirements | ||
| run: sdkmanager "platforms;android-36" "build-tools;35.0.0" "ndk;27.1.12297006" | ||
|
|
||
| - name: Build RN 0.86 test project for Android | ||
| working-directory: test-projects/rn-purchasely-test/android | ||
| run: ./gradlew :app:assembleDebug |
There was a problem hiding this comment.
No Gradle caching in
build-rn-0-86-android
The existing build-android job uses both gradle/actions/setup-gradle@v5 (with built-in Gradle cache) and an explicit actions/cache@v4 for ~/.android/build-cache. The new build-rn-0-86-android job has neither, so it will re-download and recompile Gradle wrapper and all Android dependencies from scratch on every run, significantly increasing CI time.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 142-175
Comment:
**No Gradle caching in `build-rn-0-86-android`**
The existing `build-android` job uses both `gradle/actions/setup-gradle@v5` (with built-in Gradle cache) and an explicit `actions/cache@v4` for `~/.android/build-cache`. The new `build-rn-0-86-android` job has neither, so it will re-download and recompile Gradle wrapper and all Android dependencies from scratch on every run, significantly increasing CI time.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| <View style={styles.embeddedPaywall}> | ||
| <PLYPresentationView | ||
| placementId="ONBOARDING" | ||
| onPresentationClosed={(result) => { |
There was a problem hiding this comment.
Add
flex={1} so the native view fills the 420 pt container; without it the paywall may render as an invisible zero-height region.
| <View style={styles.embeddedPaywall}> | |
| <PLYPresentationView | |
| placementId="ONBOARDING" | |
| onPresentationClosed={(result) => { | |
| <View style={styles.embeddedPaywall}> | |
| <PLYPresentationView | |
| placementId="ONBOARDING" | |
| flex={1} | |
| onPresentationClosed={(result) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: test-projects/rn-purchasely-test/App.tsx
Line: 285-288
Comment:
Add `flex={1}` so the native view fills the 420 pt container; without it the paywall may render as an invisible zero-height region.
```suggestion
<View style={styles.embeddedPaywall}>
<PLYPresentationView
placementId="ONBOARDING"
flex={1}
onPresentationClosed={(result) => {
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
What changes
Why
Officially validates v6 against React Native 0.86.
Risks
No TurboModule/API migration; runtime-only scenarios are documented for manual validation.
How to test