Sha256: 5ef358b436f0536a674619e9a559a99a5f5f2b66af1b5b89387159d2bcdcf87b

Contents?: true

Size: 1.19 KB

Versions: 29

Compression:

Stored size: 1.19 KB

Contents

module Pod
  class Prebuild
    # Check the targets, for the current limitation of the plugin
    #
    # @param [Array<PodTarget>] prebuilt_targets
    def self.check_one_pod_should_have_only_one_target(prebuilt_targets)
      targets_have_different_platforms = prebuilt_targets.reject { |t| t.pod_name == t.name }
      return unless targets_have_different_platforms.empty?

      names = targets_have_different_platforms.map(&:pod_name)
      raw_names = targets_have_different_platforms.map(&:name)
      message = "Oops, you came across a limitation of cocoapods-binary.

The plugin requires that one pod should have ONLY ONE target in the 'Pod.xcodeproj'. There are mainly 2 situations \
causing this problem:

1. One pod integrates in 2 or more different platforms' targets. e.g.
    ```
    target 'iphoneApp' do
      pod 'A', :binary => true
    end
    target 'watchApp' do
      pod 'A'
    end
    ```

2. Use different subspecs in multiple targets. e.g.
    ```
    target 'iphoneApp' do
      pod 'A/core'
      pod 'A/network'
    end
    target 'iphoneAppTest' do
      pod 'A/core'
    end
    ```

Related pods: #{names}, target names: #{raw_names}"
      raise Informative, message
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

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