feat: use ruby script for post integrate#233
Conversation
…id deps to be properly resolved by Gradle when consumed
…checked cast compilation warnings
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
|
what does this solve? |
…nto feat/use-script-for-post-integrate
@thymikee - Updated the description. TLDR; instead of directly adding the post_integrate implementation to the consumer Expo App's Podfile, we use the same behavior as of RN and Expo to reference a custom script and call a method from there, which contains the implementation. This reduces the clutter from the Podfile. |
There was a problem hiding this comment.
Pull request overview
This PR streamlines how the Expo consumer app’s Podfile implements the post_integrate hook by moving the phase-reordering logic into a reusable Ruby script shipped with @callstack/react-native-brownfield, aligning with the pattern used by Expo and React Native.
Changes:
- Inject a
requirefor a new Brownfield Ruby script into the consumerPodfile(when needed). - Replace the inline
post_integrateimplementation with a call toreact_native_brownfield_post_integrate(installer). - Publish the new
scripts/directory as part of the npm package.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react-native-brownfield/src/expo-config-plugin/ios/podfileHelpers.ts | Ensures the Ruby script is required and updates the inserted post_integrate hook to call into the script. |
| packages/react-native-brownfield/scripts/react_native_brownfield_post_integrate.rb | Introduces the extracted post_integrate implementation for Expo phase ordering. |
| packages/react-native-brownfield/package.json | Adds scripts/ to the published package contents so the Podfile require can resolve at install time. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
thymikee
left a comment
There was a problem hiding this comment.
Let’s rebase it to main and go
Summary
This PR reduces the clutter from the consumer's Expo App's
Podfileby leveraging a ruby script for handling the post_integrate implementation. This follows the same way expo and react-native adds their implementation in thePodfile.See the diff below to understand the impact of this change:
The consumer's Expo App's
Podfileonly references the import to the Ruby script and calls the function from there.Test plan
CI passes - 🟢