Sha256: c9f3c29edfb35832f3155223d07feb40a283bb1d2129d70a47cbc7d5e88a5315

Contents?: true

Size: 874 Bytes

Versions: 2

Compression:

Stored size: 874 Bytes

Contents

class CocoaPodsFixReactNative
  def fix_with_context(context)
    # Get the current version of React Native in your app
    react = nil
    context.umbrella_targets.each do |target|
      react_spec = target.specs.find { |s| s.name == 'React' || s.name.start_with?('React/') }
      react = react_spec if react_spec
    end

    # 0.44.1 -> 0_44_1
    version = react.version.to_s
    file_to_parse = version.tr('.', '_')
    path_to_fix = File.join(File.dirname(__FILE__), 'versions', file_to_parse + '.rb')

    # require 'pry'
    # binding.pry

    if File.exist? path_to_fix
      Pod::UI.section "Patching React Native #{version}" do
        require(path_to_fix)
      end
    else
      Pod::UI.warn "CP-Fix-React-Native does not support #{version} yet, please send " +
                   'PRs to https://github.com/orta/cocoapods-fix-react-native'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocoapods-fix-react-native-2018.04.28.09 lib/cocoapods-fix-react-native/version_resolver.rb
cocoapods-fix-react-native-2018.04.26.08 lib/cocoapods-fix-react-native/version_resolver.rb