Sha256: a96d32d2b0da6c2867a48b405ef3f07bd0444c6783131a437a5d20069a72f540

Contents?: true

Size: 966 Bytes

Versions: 32

Compression:

Stored size: 966 Bytes

Contents

# ABOUT NAMES
#
# There are many kinds of name in cocoapods. Two main names are widely used in this plugin.
# - root_spec.name (spec.root_name, targe.pod_name):
#   aka "pod_name"
#   the name we use in podfile. the concept.
#
# - target.name:
#   aka "target_name"
#   the name of the final target in xcode project. the final real thing.
#
# One pod may have multiple targets in xcode project, due to one pod can be used in mutiple
# platform simultaneously. So one `root_spec.name` may have multiple coresponding `target.name`s.
# Therefore, map a spec to/from targets is a little complecated. It's one to many.
#

# Tool to transform Pod_name to target efficiently
module Pod
  def self.fast_get_targets_for_pod_name(pod_name, targets, cache)
    pod_name = pod_name.split("/")[0] # Look for parent spec instead of subspecs
    if cache.empty?
      targets.select { |target| target.name == pod_name }
    else
      cache.first[pod_name] || []
    end
  end
end

Version data entries

32 entries across 32 versions & 4 rubygems

Version Path
cocoapods-binary-cache-next-0.1.16 lib/cocoapods-binary-cache/pod-binary/helper/names.rb
cocoapods-binary-cache-next-0.1.15 lib/cocoapods-binary-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.19 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.18 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.17 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.16 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.15 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.14 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.13 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.12 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.11 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.10 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.9 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-ht-1.0.0 lib/cocoapods-binary-ht/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.8 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.7 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.6 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.5 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.4 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb
cocoapods-binary-artifactory-cache-0.0.3 lib/cocoapods-binary-artifactory-cache/pod-binary/helper/names.rb