Class: Pod::Installer::Xcode::TargetValidator

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

Overview

The TargetValidator ensures that the pod and aggregate target configuration is valid for installation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aggregate_targets, pod_targets, installation_options) ⇒ TargetValidator

Create a new TargetValidator with aggregate and pod targets to validate.

Parameters:



27
28
29
30
31
# File 'lib/cocoapods/installer/xcode/target_validator.rb', line 27

def initialize(aggregate_targets, pod_targets, installation_options)
  @aggregate_targets = aggregate_targets
  @pod_targets = pod_targets
  @installation_options = installation_options
end

Instance Attribute Details

#aggregate_targetsArray<AggregateTarget> (readonly)

Returns The aggregate targets that should be validated.

Returns:

  • (Array<AggregateTarget>)

    The aggregate targets that should be validated.



10
11
12
# File 'lib/cocoapods/installer/xcode/target_validator.rb', line 10

def aggregate_targets
  @aggregate_targets
end

#installation_optionsInstallationOptions (readonly)

Returns The installation options used during this installation.

Returns:



18
19
20
# File 'lib/cocoapods/installer/xcode/target_validator.rb', line 18

def installation_options
  @installation_options
end

#pod_targetsArray<PodTarget> (readonly)

Returns The pod targets that should be validated.

Returns:

  • (Array<PodTarget>)

    The pod targets that should be validated.



14
15
16
# File 'lib/cocoapods/installer/xcode/target_validator.rb', line 14

def pod_targets
  @pod_targets
end

Instance Method Details

#validate!Object

Perform the validation steps for the provided aggregate and pod targets.



36
37
38
39
40
41
42
# File 'lib/cocoapods/installer/xcode/target_validator.rb', line 36

def validate!
  verify_no_duplicate_framework_and_library_names
  verify_no_static_framework_transitive_dependencies
  verify_swift_pods_swift_version
  verify_swift_pods_have_module_dependencies
  verify_no_multiple_project_names if installation_options.generate_multiple_pod_projects?
end