class Pod::Installer::PostInstallHooksContext

Context object designed to be used with the HooksManager which describes the context of the installer.

Attributes

pods_project[R]

@return [Xcodeproj::Project] The Pods Xcode project.

sandbox[R]

@return [Sandbox] The Sandbox for the project.

sandbox_root[R]

@return [String] The path to the sandbox root (`Pods` directory).

umbrella_targets[R]

@return [Array<UmbrellaTargetDescription>] The list of

the CocoaPods umbrella targets generated by the installer.

Public Class Methods

generate(sandbox, aggregate_targets) click to toggle source

@return [PostInstallHooksContext] Convenience class generator method

@param [Sandbox] sandbox

The sandbox

@param [Array<AggregateTarget>] aggregate_targets

The aggregate targets, which will been presented by an adequate
{UmbrellaTargetDescription} in the generated context.

@return [HooksContext] Convenience class method to generate the

static context.
# File lib/cocoapods/installer/post_install_hooks_context.rb, line 50
def self.generate(sandbox, aggregate_targets)
  umbrella_targets_descriptions = aggregate_targets.map do |umbrella|
    user_project = umbrella.user_project
    user_targets = umbrella.user_targets
    specs = umbrella.specs
    platform_name = umbrella.platform.name
    platform_deployment_target = umbrella.platform.deployment_target.to_s
    cocoapods_target_label = umbrella.label
    UmbrellaTargetDescription.new(user_project, user_targets, specs, platform_name, platform_deployment_target, cocoapods_target_label)
  end

  new(sandbox, sandbox.root.to_s, sandbox.project, umbrella_targets_descriptions)
end
new(sandbox, sandbox_root, pods_project, umbrella_targets) click to toggle source

Initialize a new instance

@param [Sandbox] sandbox see sandbox @param [String] sandbox_root see sandbox_root @param [Xcodeproj::Project] pods_project see pods_project @param [Array<UmbrellaTargetDescription>] umbrella_targets see umbrella_targets

# File lib/cocoapods/installer/post_install_hooks_context.rb, line 31
def initialize(sandbox, sandbox_root, pods_project, umbrella_targets)
  @sandbox = sandbox
  @sandbox_root = sandbox_root
  @pods_project = pods_project
  @umbrella_targets = umbrella_targets
end