Skip to content

fix: make EXUpdates as a dependency only when installed#361

Open
hurali97 wants to merge 1 commit into
mainfrom
fix/apps-without-ex-updates
Open

fix: make EXUpdates as a dependency only when installed#361
hurali97 wants to merge 1 commit into
mainfrom
fix/apps-without-ex-updates

Conversation

@hurali97
Copy link
Copy Markdown
Member

@hurali97 hurali97 commented Jun 5, 2026

Summary

This PR fixes the issue where expo-updates are added as dependency in Podspec of react-native-brownfield if the project is Expo. However, even Expo projects may not use expo-updates.

Test plan

  • Verified Locally on a new Expo App without expo-updates
  • CI Passes

Copilot AI review requested due to automatic review settings June 5, 2026 12:21
@hurali97 hurali97 changed the title fix: do not force EXUpdates for apps without it fix: make EXUpdates as a dependency only when installed Jun 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-updates is installed.
  • Gate the EXUpdates CocoaPods dependency behind that detection when REACT_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')
)
@hurali97 hurali97 requested a review from artus9033 June 5, 2026 12:25
@artus9033 artus9033 requested review from thymikee and removed request for thymikee June 5, 2026 16:58
Comment on lines +8 to +10
File.exist?(
File.join(install_root, 'node_modules', 'expo-updates', 'package.json')
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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?

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.

3 participants