Class: Pod::Installer::PostInstallHooksContext::UmbrellaTargetDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/installer/post_install_hooks_context.rb

Overview

Pure data class which describes an umbrella target.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_project, user_targets, specs, platform_name, platform_deployment_target, cocoapods_target_label) ⇒ UmbrellaTargetDescription

Initialize a new instance

Parameters:

  • user_project (Xcodeproj::Project)

    see #user_project

  • user_targets (Array<PBXNativeTarget>)

    see #user_targets

  • specs (Array<Specification>)

    see #specs

  • platform_name (Symbol)

    see #platform_name

  • platform_deployment_target (String)

    see #platform_deployment_target

  • cocoapods_target_label (String)

    see #cocoapods_target_label


106
107
108
109
110
111
112
113
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 106

def initialize(user_project, user_targets, specs, platform_name, platform_deployment_target, cocoapods_target_label)
  @user_project = user_project
  @user_targets = user_targets
  @specs = specs
  @platform_name = platform_name
  @platform_deployment_target = platform_deployment_target
  @cocoapods_target_label = cocoapods_target_label
end

Instance Attribute Details

#cocoapods_target_labelString (readonly)

Returns The label for the target.

Returns:

  • (String)

    The label for the target.


95
96
97
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 95

def cocoapods_target_label
  @cocoapods_target_label
end

#platform_deployment_targetString (readonly)

Returns The deployment target.

Returns:

  • (String)

    The deployment target.


91
92
93
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 91

def platform_deployment_target
  @platform_deployment_target
end

#platform_nameSymbol (readonly)

Returns The platform (either `:ios`, `:watchos`, `:tvos`, or `:osx`).

Returns:

  • (Symbol)

    The platform (either `:ios`, `:watchos`, `:tvos`, or `:osx`).


87
88
89
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 87

def platform_name
  @platform_name
end

#specsArray<Specification> (readonly)

Returns The list of the specifications of the target.

Returns:

  • (Array<Specification>)

    The list of the specifications of the target.


83
84
85
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 83

def specs
  @specs
end

#user_projectXcodeproj::Project (readonly)

Returns The user project into which this target is integrated.

Returns:

  • (Xcodeproj::Project)

    The user project into which this target is integrated.


73
74
75
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 73

def user_project
  @user_project
end

#user_targetsArray<PBXNativeTarget> (readonly)

Returns The list of user targets integrated by this umbrella target.

Returns:

  • (Array<PBXNativeTarget>)

    The list of user targets integrated by this umbrella target.


78
79
80
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 78

def user_targets
  @user_targets
end

Instance Method Details

#user_project_pathString

Returns The path of the user project integrated by this target.

Returns:

  • (String)

    The path of the user project integrated by this target.


118
119
120
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 118

def user_project_path
  user_project.path if user_project
end

#user_target_uuidsArray<String>

Returns The list of the UUIDs of the user targets integrated by this umbrella target. They can be used to find the targets opening the project They can be used to find the targets opening the project with Xcodeproj.

Returns:

  • (Array<String>)

    The list of the UUIDs of the user targets integrated by this umbrella target. They can be used to find the targets opening the project They can be used to find the targets opening the project with Xcodeproj.


129
130
131
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 129

def user_target_uuids
  user_targets.map(&:uuid)
end