Skip to content

Pod install fails without for empty targets #765

Closed
gpascale opened this Issue Jan 26, 2013 · 6 comments

4 participants

@gpascale

I ran 'pod install' without having any actual pods in my Podfile, just a target and xcodeproj, and my workspace ended up with only a "Pods" project. My actual project was not there. Adding a single pod fixed it.

@petergoldstein

This occurs because of the definition of the user_project_paths method in Pod::Installer::UserProjectIntegrator -

  def user_project_paths
    user_project_paths = @podfile.target_definitions.values.map do |td|
      next if td.empty?
      td.user_project.path #|| raise(Informative, "Could not resolve the Xcode project in which the " \
                           #                      "`#{td.name}' target should be integrated.")
    end.compact
  end

If there are no Pods, then the default TargetDefinition is empty and the user_project_paths array is empty.

I'm working on a patch where this method is moved to the Podfile class, which has more knowledge about a default project.

@fabiopelosin
CocoaPods member

@petergoldstein If you are working on a patch please use the cocoapods-core repo and the 0.17 branch, they are almost ready and they are architecturally very different. Docs can be found here

@petergoldstein

@irrationalfab - Thanks. I was using this repo. Let me switch over.

@fabiopelosin
CocoaPods member

Related to #840

@fabiopelosin
CocoaPods member

@petergoldstein did you do any work on this?

@kylef
kylef commented Mar 11, 2014

Duplicate of #1830.

@kylef kylef closed this Mar 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.