New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1.0.beta.1] Unable to find host target for Pods-ExampleShared #5620

Closed
enricenrich opened this Issue Jul 13, 2016 · 9 comments

Comments

Projects
None yet
6 participants
@enricenrich

enricenrich commented Jul 13, 2016

Report

What did you do?

Run 'pod install'

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

[!] Unable to find host target for Pods-ExampleShared. Please add the host targets for the embedded targets to the Podfile.

CocoaPods Environment

Stack

   CocoaPods : 1.1.0.beta.1
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.11.5 (15F34)
       Xcode : 7.3 (7D175)
         Git : git version 2.6.4
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : doist - git@github.com:Doist/doist-specs.git @ 8e5bc6d4c121dc2af892f9b123816f40eb8862aa
               master - https://github.com/CocoaPods/Specs.git @ 5aa14168d2ca5b0be1f8b4c4c9f90bab2ecea8c8

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.0
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.0.0
cocoapods-try         : 1.1.0
@orta

This comment has been minimized.

Show comment
Hide comment
@orta

orta Jul 13, 2016

Member

Did you try following this part of the error?

Please add the host targets for the embedded targets to the Podfile.

( and can you show us your Podfile too please? )

Member

orta commented Jul 13, 2016

Did you try following this part of the error?

Please add the host targets for the embedded targets to the Podfile.

( and can you show us your Podfile too please? )

@enricenrich

This comment has been minimized.

Show comment
Hide comment
@enricenrich

enricenrich Jul 13, 2016

@orta I'm not sure what to do with what the message says. Tried to find it on the docs of CocoaPods for the Podfile, but didn't find anything so far.

Podfile:

source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

install! 'cocoapods',
         :deterministic_uuids => false,
         :integrate_targets => true,
         :deduplicate_targets => true

def developmentPods
    # Development Pods
end

def fabricPods
    pod 'Fabric'
    pod 'Crashlytics'
end

target 'Example' do
    platform :ios, '9.0'

    developmentPods
    fabricPods

    # Multiple pods

    target 'ExampleTests' do
       inherit! :search_paths
    end
end

target 'ExampleToday' do
    platform :ios, '9.0'

    developmentPods
    fabricPods
end

target 'ExampleShare' do
    platform :ios, '9.0'

    developmentPods
    fabricPods
end

target 'ExampleWatchOSExtension' do
    platform :watchos, '2.0'
    developmentPods
end

target 'ExampleShared' do
    platform :ios, '9.0'
    developmentPods
end

enricenrich commented Jul 13, 2016

@orta I'm not sure what to do with what the message says. Tried to find it on the docs of CocoaPods for the Podfile, but didn't find anything so far.

Podfile:

source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

install! 'cocoapods',
         :deterministic_uuids => false,
         :integrate_targets => true,
         :deduplicate_targets => true

def developmentPods
    # Development Pods
end

def fabricPods
    pod 'Fabric'
    pod 'Crashlytics'
end

target 'Example' do
    platform :ios, '9.0'

    developmentPods
    fabricPods

    # Multiple pods

    target 'ExampleTests' do
       inherit! :search_paths
    end
end

target 'ExampleToday' do
    platform :ios, '9.0'

    developmentPods
    fabricPods
end

target 'ExampleShare' do
    platform :ios, '9.0'

    developmentPods
    fabricPods
end

target 'ExampleWatchOSExtension' do
    platform :watchos, '2.0'
    developmentPods
end

target 'ExampleShared' do
    platform :ios, '9.0'
    developmentPods
end
@orta

This comment has been minimized.

Show comment
Hide comment
@orta

orta Jul 13, 2016

Member

Hrm, I think you're going to need to go through the guides or some tutorials, those are my example Podfiles, which would only work if you had the same Xcode project as I had when setting it up.

I'd recommend using pod init to let cocoapods handle creating your target structure.

Member

orta commented Jul 13, 2016

Hrm, I think you're going to need to go through the guides or some tutorials, those are my example Podfiles, which would only work if you had the same Xcode project as I had when setting it up.

I'd recommend using pod init to let cocoapods handle creating your target structure.

@enricenrich

This comment has been minimized.

Show comment
Hide comment
@enricenrich

enricenrich Jul 13, 2016

@orta What I see is that on the stack, the Xcode version says it's 7.3, but I'm using 8 Beta 2 right now. It may be the issue too?

Using the last stable version of CocoaPods it works as expected, it's just with the beta.

enricenrich commented Jul 13, 2016

@orta What I see is that on the stack, the Xcode version says it's 7.3, but I'm using 8 Beta 2 right now. It may be the issue too?

Using the last stable version of CocoaPods it works as expected, it's just with the beta.

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Jul 13, 2016

Member

Please share a project that reproduces this issue, I think @benasher44 might want to take a look

Member

segiddins commented Jul 13, 2016

Please share a project that reproduces this issue, I think @benasher44 might want to take a look

@enricenrich

This comment has been minimized.

Show comment
Hide comment
@enricenrich

enricenrich Jul 13, 2016

@orta @segiddins I fixed the issue by removing the target from the project and adding it again.

enricenrich commented Jul 13, 2016

@orta @segiddins I fixed the issue by removing the target from the project and adding it again.

@benasher44

This comment has been minimized.

Show comment
Hide comment
@benasher44

benasher44 Jul 17, 2016

Member

I spent some time staring at this one to see if there was more I could do, but from what I can tell if the analyzer could find the today extension but not the share extension, then this feels like some kind of project corruption that would be fixed by re-adding the target. I'm open to thoughts on improving the error message here though, especially since it doesn't seem likely that there's much CocoaPods could have done at install-time to realize what was going on and fix it.

Member

benasher44 commented Jul 17, 2016

I spent some time staring at this one to see if there was more I could do, but from what I can tell if the analyzer could find the today extension but not the share extension, then this feels like some kind of project corruption that would be fixed by re-adding the target. I'm open to thoughts on improving the error message here though, especially since it doesn't seem likely that there's much CocoaPods could have done at install-time to realize what was going on and fix it.

@ballagas

This comment has been minimized.

Show comment
Hide comment
@ballagas

ballagas Jul 27, 2016

I also ran into this issue. Re-running `pod init' resolved the issue. For some reason, it seems that if I remove the autogenerated 'Test' target embedded in the main target, the issue resurfaces for me.

ballagas commented Jul 27, 2016

I also ran into this issue. Re-running `pod init' resolved the issue. For some reason, it seems that if I remove the autogenerated 'Test' target embedded in the main target, the issue resurfaces for me.

@atreat

This comment has been minimized.

Show comment
Hide comment
@atreat

atreat May 10, 2018

Contributor

I ran into this when trying to add a target for a Notification extension in my app. I didn't have my Notification extension setup as a 'Target Dependency' on my App target.

Contributor

atreat commented May 10, 2018

I ran into this when trying to add a target for a Notification extension in my app. I didn't have my Notification extension setup as a 'Target Dependency' on my App target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment