Sha256: 80d0bcbe3406129c36d33fb21a842a286e2c08fd99f63ebddbfc779cf88cda47

Contents?: true

Size: 819 Bytes

Versions: 1

Compression:

Stored size: 819 Bytes

Contents

require 'cocoapods'

module CocoaPodsExpert

  Pod::HooksManager.register('cocoapods-expert-difficulty', :pre_install) do |context, _|
    Pod::UI.titled_section 'Supporting all platforms in CocoaPods' do
    end
  end

end

module Pod
  class Specification
    alias_method :tvos_supported_platform_names, :supported_platform_names

    def supported_platform_names
      # if there's no Podfile config do default
      return tvos_supported_platform_names if validates_for_expert

      # Otherwise return all platforms for all pods
      names = PLATFORMS
      names.map { |name| Platform.new(name, deployment_target(name)) }
    end

    def validates_for_keys
      podfile = Pod::Config.instance.podfile
      podfile && podfile.plugins && !podfile.plugins['cocoapods-expert-difficulty'].nil?
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocoapods-expert-difficulty-0.0.1 lib/cocoapods_plugin.rb