class Pod::Installer::BaseInstallHooksContext
Context object designed to be used with the HooksManager
which describes the context of the installer.
Attributes
@return [Array<Pod::Project>] the subprojects nested under pods_project.
@return [Xcodeproj::Project] The Pods Xcode
project.
@return [Sandbox] The Sandbox
for the project.
@return [String] The path to the sandbox root (‘Pods` directory).
@return [Array<UmbrellaTargetDescription>] The list of
the CocoaPods umbrella targets generated by the installer.
Public Class Methods
@return [PostInstallHooksContext] Convenience class generator method
@param [Sandbox] sandbox
The sandbox
@param [Project] pods_project
The pods project.
@param [Project] pod_target_subprojects
The subprojects nested under pods_project.
@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/base_install_hooks_context.rb, line 62 def self.generate(sandbox, pods_project, pod_target_subprojects, 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, pods_project, pod_target_subprojects, umbrella_targets_descriptions) end
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<Xcodeproj::Project>] pod_target_subprojects
see pod_target_subprojects
@param [Array<UmbrellaTargetDescription>] umbrella_targets
see umbrella_targets
# File lib/cocoapods/installer/base_install_hooks_context.rb, line 36 def initialize(sandbox, sandbox_root, pods_project, pod_target_subprojects, umbrella_targets) @sandbox = sandbox @sandbox_root = sandbox_root @pods_project = pods_project @pod_target_subprojects = pod_target_subprojects @umbrella_targets = umbrella_targets end
Public Instance Methods
@return [Array<Pod::Project>] all projects generated during installation
# File lib/cocoapods/installer/base_install_hooks_context.rb, line 78 def generated_projects [pods_project] + pod_target_subprojects end