Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/react-native-brownfield/ReactBrownfield.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

expo_updates_installed = lambda do
install_root = Pod::Config.instance.installation_root.to_s

File.exist?(
File.join(install_root, 'node_modules', 'expo-updates', 'package.json')
)
Comment thread
hurali97 marked this conversation as resolved.
Outdated
Comment thread
artus9033 marked this conversation as resolved.
Outdated
end

Pod::Spec.new do |spec|
spec.name = "ReactBrownfield"
spec.version = package['version']
Expand Down Expand Up @@ -33,7 +41,7 @@ Pod::Spec.new do |spec|

if ENV['REACT_NATIVE_BROWNFIELD_USE_EXPO_HOST'] == '1'
spec.dependency 'Expo'
spec.dependency 'EXUpdates'
spec.dependency 'EXUpdates' if expo_updates_installed.call
end

install_modules_dependencies(spec)
Expand Down
Loading