Method: Pod::Specification::DSL#license=

Defined in:
lib/cocoapods-core/specification/dsl.rb

#license=(license) ⇒ Object

The license of the Pod.


Unless the source contains a file named LICENSE.* or LICENCE.*, the path of the license file or the integral text of the notice commonly used for the license type must be specified. If a license file is specified, it either must be without a file extensions or be one of txt, md, or markdown.

This information is used by CocoaPods to generate acknowledgement files (markdown and plist) which can be used in the acknowledgements section of the final application.

Examples:


spec.license = 'MIT'

spec.license = { :type => 'MIT', :file => 'MIT-LICENSE.txt' }

spec.license = { :type => 'MIT', :text => <<-LICENSE
                   Copyright 2012
                   Permission is granted to...
                 LICENSE
               }

Parameters:

  • license (String, Hash{Symbol=>String})

Options Hash (license):

  • :type (String)

    license type

  • :file (String)

    file containing full license text. Supports txt, md, and markdown

  • :text (String)

    full license text

Parameters:

  • license (String)

    The type of the license



279
280
281
282
# File 'lib/cocoapods-core/specification/dsl.rb', line 279

root_attribute :license,
:container => Hash,
:keys      => LICENSE_KEYS,
:required  => true