Repository navigation
[No QA] Add support for consuming React Native artifacts on iOS - #96293
Conversation
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. |
|
TODO: Before merging this we need to create artifacts from this branch |
…ogic to typescript utilities
… merging main The verifyReactNativePatches workflow was inlined into publishReactNativeArtifacts.yml on main; point its script references at the relocated scripts/artifacts-utils/ path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
119997d to
17ff8af
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5d57f27fb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@mateuuszzzzz Could you resolve the above comments? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@roryabraham all yours. I extended our |
|
legit CI failure here |
|
Fixed |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.52-11 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
This PR adds the code that lets our custom prebuilt React Native artifacts be consumed at build time, and extracts the shared resolution logic into a single TypeScript utility.
Until now, the logic that decides which published artifact version matches the local patches lived only on the Android side, in Gradle. This PR moves that common logic into a shared TypeScript utility (
scripts/artifacts-utils/lib/artifactsResolver.ts, invoked viaresolve-artifacts.ts). Both the Android Gradle consumer and the new iOS Ruby consumer (scripts/artifacts-utils/ios/patched_ios_artifacts.rb) now call this single resolver, so React Native version detection, GitHub Packages version lookups, and patches hash matching all live in one place instead of being duplicated per platform.The patched artifacts utilities were also reorganized under
scripts/artifacts-utils/(a small folder structure cleanup), andcompute-patches-hash.shmoved there so publishing and consumption reference the same script.iOS consumer
The iOS Ruby helper (
patched_ios_artifacts.rb) reopensReactNativeCoreUtilsto point React Native Core resolution and download at our private GitHub Packages Maven repo, matched by the patches hash. It lives in this repo because the HybridApp build (Mobile-Expensify) requires it, but we also have plans to extend support to standalone NewDotMobile-Expensify companion PR
This change is paired with Mobile-Expensify PR https://github.com/Expensify/Mobile-Expensify/pull/13918, which wires the HybridApp iOS build to consume the artifacts. That PR requires the iOS helper from this repo, builds RNFB and RNSentry as static libraries so they stay compatible with the prebuilt React Core under
use_frameworks!, and adds aBUILD_RN_FROM_SOURCEtoggle so developers can fall back to building React Native from source if prebuilds ever cause a problem for them.Standalone NewDot is not supported yet
Standalone NewDot iOS does not consume the prebuilt artifacts for now. Under
use_frameworks! :linkage => :static(required by Firebase) the prebuilt React Core cannot exposeReact_RCTAppDelegateas an importable Swift module, which the standalone SwiftAppDelegateneeds. HybridApp is unaffected because itsAppDelegateis written in Objective C and imports that header directly with#importrather than as a Swift module. Standalone consumption is deferred.Depends on
This PR builds on the publishing infrastructure in #88523. Until that one merges, the diff here also shows those publishing changes.
Fixed Issues
$ #86437
PROPOSAL:
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/13918
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari