Method: Pod::Podfile::DSL#source

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

#source(source) ⇒ void

This method returns an undefined value.

Specifies the location of specs


Use this method to specify sources. The order of the sources is relevant. CocoaPods will use the highest version of a Pod of the first source which includes the Pod (regardless whether other sources have a higher version).

The official CocoaPods source is implicit. Once you specify another source, then it will need to be included.

Examples:

Specifying to first use the Artsy repository and then the CocoaPods Master Repository


source 'https://github.com/artsy/Specs.git'
source 'https://cdn.cocoapods.org/'

Parameters:

  • source (String)

    The URL of a specs repository.

[View source]

881
882
883
884
885
# File 'lib/cocoapods-core/podfile/dsl.rb', line 881

def source(source)
  hash_sources = get_hash_value('sources') || []
  hash_sources << source
  set_hash_value('sources', hash_sources.uniq)
end