fix: make EXUpdates as a dependency only when installed#361
Open
hurali97 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the ReactBrownfield.podspec so that Expo-host integration doesn’t unconditionally add the EXUpdates pod, avoiding build failures for Expo apps that don’t include expo-updates.
Changes:
- Add a small helper to detect whether
expo-updatesis installed. - Gate the
EXUpdatesCocoaPods dependency behind that detection whenREACT_NATIVE_BROWNFIELD_USE_EXPO_HOST=1.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6
to
+10
| install_root = Pod::Config.instance.installation_root.to_s | ||
|
|
||
| File.exist?( | ||
| File.join(install_root, 'node_modules', 'expo-updates', 'package.json') | ||
| ) |
artus9033
reviewed
Jun 5, 2026
Comment on lines
+8
to
+10
| File.exist?( | ||
| File.join(install_root, 'node_modules', 'expo-updates', 'package.json') | ||
| ) |
Collaborator
There was a problem hiding this comment.
I'm wondering if we could dynamically establish the path to this with node require CLI call like in this case: https://github.com/expo/expo/blob/a260901d706ba7d5fa1ee0a9e999b6b6b255a858/apps/brownfield-tester/integrated/android/settings.gradle.kts#L5-L9 - this would be more error-prone. WDYT @hurali97?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the issue where
expo-updatesare added as dependency in Podspec ofreact-native-brownfieldif the project is Expo. However, even Expo projects may not useexpo-updates.Test plan
expo-updates