Method: Pod::Podfile::TargetDefinition#use_frameworks!

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

#use_frameworks!(option = true) ⇒ void

This method returns an undefined value.

Sets whether the target definition's pods should be built as frameworks.

Parameters:

  • option (Boolean, Hash) (defaults to: true)

    Whether pods that are integrated in this target should be built as frameworks. If the option is a boolean then the value affects both packaging and linkage styles. If set to true, then dynamic frameworks are used and if it's set to false, then static libraries are used. If the option is a hash then :framework packaging is implied and the user configures the :linkage style to use.



397
398
399
400
401
402
403
404
405
406
407
# File 'lib/cocoapods-core/podfile/target_definition.rb', line 397

def use_frameworks!(option = true)
  value = case option
          when true, false
            option ? BuildType.dynamic_framework : BuildType.static_library
          when Hash
            BuildType.new(:linkage => option.fetch(:linkage), :packaging => :framework)
          else
            raise ArgumentError, "Got `#{option.inspect}`, should be a boolean or hash."
          end
  set_hash_value('uses_frameworks', value.to_hash)
end