Method: Pod::Podfile::DSL#post_install

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

#post_install(&block) ⇒ void

This method returns an undefined value.

This hook allows you to make any last changes to the generated Xcode project before it is written to disk, or any other tasks you might want to perform.

It receives the [Pod::Installer] as its only argument.

Examples:

Customizing the build settings of all targets


post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['GCC_ENABLE_OBJC_GC'] = 'supported'
    end
  end
end

Raises:



977
978
979
980
# File 'lib/cocoapods-core/podfile/dsl.rb', line 977

def post_install(&block)
  raise Informative, 'Specifying multiple `post_install` hooks is unsupported.' if @post_install_callback
  @post_install_callback = block
end