Cocoapods: pod is unable to find test target that clearly is there

Created on 29 Nov 2016  路  1Comment  路  Source: CocoaPods/CocoaPods

Report

What did you do?

  1. Added a target section for the tests target for my project.
  2. Ran pod install

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

pod install returned an error:

[!] Unable to find a target named HopSpotsTests, did find HopspotsTester, HopspotsTesterTests, and HopspotsTesterUITests.

CocoaPods Environment

Stack

   CocoaPods : 1.1.1
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.12.1 (16B2555)
       Xcode : 8.1 (8B62)
         Git : git version 2.9.3 (Apple Git-75)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 7bc3961c3e8ca7c5eb9ce64d3dc15b51e82e3777

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate  : 1.0.1
cocoapods-dependencies : 1.0.0
cocoapods-plugins      : 1.0.0
cocoapods-search       : 1.0.0
cocoapods-stats        : 1.0.0
cocoapods-trunk        : 1.1.1
cocoapods-try          : 1.1.0

Podfile

platform :ios, '8.0'

workspace 'HopSpots'
project 'HopSpots.xcodeproj'
project 'HopspotsCommunication/HopspotsCommunication.xcodeproj'
project 'HopspotsTester/HopspotsTester.xcodeproj'

target :HopSpots do
    pod 'Parse'
    pod 'ParseUI'
    pod 'YapDatabase'
    pod 'MBProgressHUD', '~> 0.9.1'
    pod 'Reachability', '~> 3.2'
    pod 'Parse+NSCoding', :git => 'https://github.com/drdaz/Parse-NSCoding'
    project 'HopSpots.xcodeproj'
end

target :HopSpotsTests do
    pod 'Parse'
end

target :HopspotsCommunication do
    pod 'RZBluetooth', '~> 1.0.2'
    pod 'Bolts'
    project 'HopspotsCommunication/HopspotsCommunication.xcodeproj'
end

target :HopspotsCommunicationTests do
    pod 'RZBluetooth/Test', '~> 1.0.2'
    project 'HopspotsCommunication/HopspotsCommunication.xcodeproj'
end

target :HopspotsTester do
    pod 'M13ProgressSuite', '~> 1.2.7'
    project 'HopspotsTester/HopspotsTester.xcodeproj'
end

Project that demonstrates the issue

I'd prefer to do this privately, if possible. I'd rather not expose any more of my client's project to the rest of the internet.

Additional info

The error is quite bizarre; xcodebuild can see the target in question just fine:

Darrens-iMac:Hopspots drdaz$ xcodebuild -list
2016-11-29 12:11:33.111 xcodebuild[1281:61242] [MT] PluginLoading: Required plug-in compatibility UUID DA4FDFD8-C509-4D8B-8B55-84A7B66AE701 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/OMColorSense.xcplugin' not present in DVTPlugInCompatibilityUUIDs
Information about project "HopSpots":
    Targets:
        HopSpots
        HopSpotsTests
        HopSpotsUITests

    Build Configurations:
        Debug
        Release

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    Schemes:
        HopSpots

Darrens-iMac:Hopspots drdaz$ pod install
Analyzing dependencies
[!] Unable to find a target named `HopSpotsTests`, did find `HopspotsTester`, `HopspotsTesterTests`, and `HopspotsTesterUITests`.

Most helpful comment

Aaaand I found the issue. I needed to specify the project file in the target; so here
project 'HopSpots.xcodeproj'

>All comments

Aaaand I found the issue. I needed to specify the project file in the target; so here
project 'HopSpots.xcodeproj'

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spencerkohan picture spencerkohan  路  3Comments

pronebird picture pronebird  路  3Comments

steffendsommer picture steffendsommer  路  3Comments

dawnnnnn picture dawnnnnn  路  3Comments

tlandsmancars picture tlandsmancars  路  3Comments