Method: Pod::Specification::DSL#platform=

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

#platform=(args) ⇒ Object

The platform on which this Pod is supported. Leaving this blank means the Pod is supported on all platforms. When supporting multiple platforms you should use deployment_target below instead.

Examples:


spec.platform = :osx, '10.8'

spec.platform = :ios

spec.platform = :osx

Parameters:

  • args (Array<Symbol, String>)

    A tuple where the first value is the name of the platform, (either :ios or :osx) and the second is the deployment target.



617
618
619
620
621
622
623
624
625
# File 'lib/cocoapods-core/specification/dsl.rb', line 617

def platform=(args)
  name, deployment_target = args
  name = :osx if name.to_s == 'macos'
  attributes_hash['platforms'] = if name
                                   { name.to_s => deployment_target }
                                 else
                                   {}
                                 end
end