Skip to content

Use React Native's prebuilt iOS core in the example instead of patching it - #28

Merged
janicduplessis merged 2 commits into
mainfrom
@janic/example-drop-rn-patch
Sep 23, 2026
Merged

janicduplessis merged 2 commits into
mainfrom
@janic/example-drop-rn-patch

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

The example no longer carries patches/react-native@0.88.0-rc.1.patch, and the example and CI now build with React Native's prebuilt iOS core. Clean iOS builds of the example drop from 220 s to 24 s locally.

The patch backported the event-beat change from react/react-native#58530. React Native's precompiled binaries don't include a source patch, so the Podfile and the CI iOS job set RCT_USE_PREBUILT_RNCORE=0 and every example build compiled React Native core from source. Same-frame delivery of the first iOS event is a React Native issue that #58530 fixes upstream (merged to RN main, not in 0.88). platforms.md keeps its note about this, and docs/workflow.md now says in one line how to apply the upstream change by hand for testing.

  • Removed the patch and its patchedDependencies entry. The lockfile drops the patch_hash suffixes.
  • Removed RCT_USE_PREBUILT_RNCORE=0 from the Podfile, and both RCT_* env vars from the CI iOS job. React Native 0.88 defaults both to 1 (react_native_pods.rb).
  • Regenerated example/ios/Podfile.lock. The React pods now depend on React-Core-prebuilt.
  • Removed the "React Native event-beat patch" sections from docs/workflow.md and website/docs/example.md. The Pending/Ready note from the latter now sits under "Measurement status". Also removed the link from platforms.md to that section.

Test plan

Local, Apple M4, Xcode 26.6. The build ran the CI command (xcodebuild ... -destination 'generic/platform=iOS Simulator' -derivedDataPath build) after a clean pod install and rm -rf build:

CompileC tasks Wall time
main (patched RN core built from source) 1442 220 s
This branch (prebuilt RN core) 80 24 s

The CI ios job drops from 16m08s on main (run), where xcodebuild took 14 min, to 5m05s on this PR (run), where xcodebuild took 2m29s.

  • pnpm install --frozen-lockfile and a clean bundle exec pod install (Ruby 3.4.8) leave the tree unchanged. Pod install logs Using React Native Core and React Native Dependencies prebuilt versions.
  • iOS (no reserved regions on this runtime, so this doesn't check region content or first-frame timing): I ran stim ios on a Stim-created iPhone 17 simulator (iOS 26.5, Xcode 26.6). The example launches, the Full screen layout shows Measurement: Ready and "No active reserved regions", and stim logs --errors is clean.
  • Android: ./gradlew :app:assembleDebug -PreactNativeArchitectures=arm64-v8a succeeds. Android already used the prebuilt AAR, so the patch never affected it.

iOS example

The example and CI now use the prebuilt React Native core instead of
compiling it from source for the patch.
@janicduplessis
janicduplessis marked this pull request as ready for review September 23, 2026 18:22
@janicduplessis
janicduplessis merged commit c1a003d into main Sep 23, 2026
4 checks passed
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.

1 participant