Skip to content

feat(example): validate React Native 0.86#258

Open
kherembourg wants to merge 6 commits into
feat/sdk-v6-migrationfrom
feat/react-native-0-86
Open

feat(example): validate React Native 0.86#258
kherembourg wants to merge 6 commits into
feat/sdk-v6-migrationfrom
feat/react-native-0-86

Conversation

@kherembourg

Copy link
Copy Markdown
Contributor

What changes

  • Makes the RN 0.86 sample consume local v6 packages with New Architecture.
  • Adds fullscreen and embedded paywall coverage plus Android/iOS CI builds.

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

  • Root typecheck and 150 Jest tests
  • Sample lint/typecheck/bundle
  • Android debug and unsigned iOS builds.

@linear-code
linear-code Bot marked this pull request as ready for review July 17, 2026 15:35
@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR upgrades the rn-purchasely-test sample to React Native 0.86 with the New Architecture enabled, switches its Purchasely dependencies to local file: paths for v6 validation, and adds two new CI jobs (build-rn-0-86-android and build-rn-0-86-ios) to gate the build on every PR. The App.tsx is rewritten to use the v6 builder API and adds both fullscreen and embedded paywall validation flows.

  • CI breakage: The build-rn-0-86-ios job contains a stray "Build example for iOS" step that references example/ios/example.xcworkspace — a workspace that never has its CocoaPods installed in this job. This will always fail; the step should be removed (the example app build is already covered by the existing build-ios job).
  • New Architecture: Both Android (newArchEnabled=true in gradle.properties) and iOS (RCT_NEW_ARCH_ENABLED=1 in Podfile, RCTNewArchEnabled in Info.plist) are correctly opted in; compileSdk/targetSdk bumped to 36 and Kotlin to 2.3.21 to match.
  • Metro configuration: watchFolders and nodeModulesPaths are added so Metro can resolve the monorepo file: packages during development.

Confidence Score: 3/5

The PR introduces a CI job that will always fail on macOS runners, meaning the new iOS validation gate it adds cannot actually pass until the stray step is removed.

The build-rn-0-86-ios job contains a 'Build example for iOS' step that references a CocoaPods workspace for the example app, but that app's pods are never installed within this job. Every run on a fresh macOS runner will error out at that step. The Android job and all non-iOS changes are correct.

.github/workflows/ci.yml — the trailing step in build-rn-0-86-ios needs to be removed before the job can pass.

Important Files Changed

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]
Loading
%%{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]
Loading

Comments Outside Diff (1)

  1. .github/workflows/ci.yml, line 209-218 (link)

    P1 "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.

    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.

    Fix in Claude Code Fix in Cursor Fix in Codex

Fix All in Claude Code Fix All in Cursor Fix All in Codex

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

Comment thread .github/workflows/ci.yml
Comment on lines +142 to +175
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Fix in Claude Code Fix in Cursor Fix in Codex

Comment on lines +285 to +288
<View style={styles.embeddedPaywall}>
<PLYPresentationView
placementId="ONBOARDING"
onPresentationClosed={(result) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Add flex={1} so the native view fills the 420 pt container; without it the paywall may render as an invisible zero-height region.

Suggested change
<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!

Fix in Claude Code Fix in Cursor Fix in Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants