Sha256: 5847d96028d95a848906808b88ed0b1e6397f999947c93ddf31c4375f25db9b9

Contents?: true

Size: 915 Bytes

Versions: 5

Compression:

Stored size: 915 Bytes

Contents

require 'cocoapods-fix-react-native/version_resolver'

Pod::HooksManager.register('cocoapods-fix-react-native', :post_install) do |context|
  
  # Check that the min version of iOS has been set right for CocoaPods
  # This happens when a pod has a lower than iOS 6 deployment target.
  all_pods_targets = context.pods_project.targets
  all_pods_targets.each do |t|
    deployment_target = t.build_configurations.first.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
    has_react_dep =  t.dependencies.find { |dep| dep.name == "React" }

    if has_react_dep && deployment_target == '4.3'
      raise 'You have a Pod which has a deployment target of 4.3, and a dependency on React.' + 
            "\nIn order for React Native to compile you need to give the Podspec for #{t.name} a version like `s.platform = :ios, '9.0'`.\n"
    end
  end

  fixer = CocoaPodsFixReactNative.new
  fixer.fix_with_context(context)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cocoapods-fix-react-native-2018.04.28.09 lib/cocoapods_plugin.rb
cocoapods-fix-react-native-2018.04.26.08 lib/cocoapods_plugin.rb
cocoapods-fix-react-native-2018.04.19.12 lib/cocoapods_plugin.rb
cocoapods-fix-react-native-2018.04.18.06 lib/cocoapods_plugin.rb
cocoapods-fix-react-native-2018.04.17.13 lib/cocoapods_plugin.rb