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) ⇒ TargetValidator

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

Parameters:

  • aggregate_targets (Array<AggregateTarget>)

    The aggregate targets to validate.

  • pod_targets (Array<PodTarget>)

    The pod targets to validate.



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

def initialize(aggregate_targets, pod_targets)
  @aggregate_targets = aggregate_targets
  @pod_targets = pod_targets
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.



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

def aggregate_targets
  @aggregate_targets
end

#pod_targetsArray<PodTarget> (readonly)

Returns The pod targets that should be validated.

Returns:

  • (Array<PodTarget>)

    The pod targets that should be validated.



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

def pod_targets
  @pod_targets
end

Instance Method Details

#validate!Object

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



34
35
36
37
38
39
# File 'lib/cocoapods/installer/xcode/target_validator.rb', line 34

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
end