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

Already on GitHub? Sign in to your account

No results for "undefined method `frameworks_build_phase' for #<Xcodeproj::Project::Object::PBXAggregateTarget:0x007f851b26b180>". #729

Closed
rohinnz opened this Issue Jan 9, 2013 · 10 comments

Comments

Projects
None yet
4 participants

rohinnz commented Jan 9, 2013

CocoaPods installed just fine. I got error when I ran 'pod install'

Here's my Podfile:

platform :ios, '5.0'
pod 'AFNetworking', '~> 1.1.0'

Owner

alloy commented Jan 10, 2013

This is likely your application’s Xcode project. Can you share its contents, or just the part that has the PBXAggregateTarget?

rohinnz commented Jan 10, 2013

Hi, thanks for your help. It looks like it was to do with the order of my targets. I had an Aggregate target at the top of the list, followed by our app's target and several targets for white label versions of our app. After moving the Aggregate target to the bottom of the list, the 'pod install' command worked just fine.

Owner

alloy commented Jan 10, 2013

Hmm, I still don’t think that have happened, though. Is it possible to send us the previous failing version of your project?

hyukhur commented Jan 11, 2013

I got same error in 0.16.
but in 0.15 version it worked.
Here is my error stack.

Stack

   CocoaPods : 0.16.0
        Ruby : ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]
    RubyGems : 1.8.24
        Host : Mac OS X 10.7.5 (11G63)
       Xcode : 4.5.2 (4G2008a)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 0975b6a12e776977841f8e193953677257d27085

Podfile

          # -*- coding: utf-8 -*-
platform :ios
xcodeproj 'MyApp', 'Alpha' => :debug

pod 'CocoaLumberjack'

Error

undefined method `frameworks_build_phase' for #<Xcodeproj::Project::Object::PBXAggregateTarget:0x10bea3d58>
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/installer/user_project_integrator.rb:141:in `targets'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/installer/user_project_integrator.rb:126:in `reject'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/installer/user_project_integrator.rb:126:in `targets'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/installer/user_project_integrator.rb:79:in `integrate!'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:55:in `to_proc'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/installer/user_project_integrator.rb:21:in `map'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/installer/user_project_integrator.rb:21:in `integrate!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/installer.rb:140:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/command/install.rb:46:in `run_install_with_update'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/lib/cocoapods/command.rb:75:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0/bin/pod:16
/usr/bin/pod:23:in `load'
/usr/bin/pod:23
Owner

alloy commented Jan 11, 2013

@hyukhur Thanks, but I really need a Xcode project to be able to reproduce the issue, so if either of you can share it (you can email me directly), that would be great.

hyukhur commented Jan 15, 2013

sorry, I couldn't share it.
but,
I found something odd, there is no method that named "frameworks_build_phase" in xcodeproj.
there's "frameworks_build_phases".
I think it should be "framworks_build_phase".

celer commented Jan 25, 2013

I have the same error

undefined method `frameworks_build_phase' for #<Xcodeproj::Project::Object::PBXAggregateTarget:0x102fdd5b0>
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:141:in `targets'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:126:in `reject'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:126:in `targets'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:79:in `integrate!'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `to_proc'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:21:in `map'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:21:in `integrate!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:140:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/command/install.rb:46:in `run_install_with_update'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/command.rb:75:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/bin/pod:16
/usr/bin/pod:19:in `load'
/usr/bin/pod:19

And the source which is causing the error can be downloaded here:

http://celer.github.com/hopjs/HopWebTester_pods_bug.tgz

  • So some caveats I have no idea if this will compile it should ... allot of the code is generated
  • I'm using google gyp to generate the xcode project which seems to work fine until I involve pod
  • If you simply run pod install you'll see the error.
  • If you want to follow my build process

First install gyp

svn checkout http://gyp.googlecode.com/svn/trunk/ gyp
cd gyp
sudo python setup.py install

then

make cleanproject
make

then

open *.xcworkspace

My end game is to generate restful hooks for hopjs along with a native test client ...

celer commented Jan 25, 2013

I'm getting the same error

undefined method `frameworks_build_phase' for #<Xcodeproj::Project::Object::PBXAggregateTarget:0x10b3ef3a8>
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:141:in `targets'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:126:in `reject'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:126:in `targets'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:79:in `integrate!'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `to_proc'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:21:in `map'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer/user_project_integrator.rb:21:in `integrate!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:140:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/command/install.rb:46:in `run_install_with_update'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/lib/cocoapods/command.rb:75:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.1/bin/pod:16
/usr/bin/pod:19:in `load'
/usr/bin/pod:19

but I'm using Gyp to build my project, lets see if I can get you what your after.

http://celer.github.com/hopjs/HopWebTester_pods_bug.tgz

(Everything is in HopAPI is generated ... I make no promises it will compile)

Contains my attempt at getting Gyp & Pods working together.

You can simply run

pod install

To recreate the issue

Or to redo everything

  1. First install gyp
svn checkout http://gyp.googlecode.com/svn/trunk/ gyp
cd gyp
sudo python setup.py install
  1. Then recreate the xcode and pod stuff:
make cleanproject
make
Owner

alloy commented Feb 6, 2013

@celer Thanks for that, I’ll look into it ASAP.

@alloy alloy closed this in 109af82 Feb 7, 2013

Owner

alloy commented Feb 7, 2013

Thanks for the example, @celer!

fabiopelosin added a commit that referenced this issue Feb 12, 2013

Merge branch 'master' into 0.17
* master:
  [Specs] Fix for master repo changes
  Never consider aggregate targets for integration. Fixes #729 & 784.
  Let’s get Travis to build again.
  Updated downloader spec to check for unflattened zipfiles
  Do not flatten the zip files downloaded via http

Conflicts:
	lib/cocoapods/downloader/http.rb
	lib/cocoapods/installer/user_project_integrator.rb
	spec/functional/downloader_spec.rb
	spec/unit/installer/user_project_integrator_spec.rb
	spec/unit/resolver_spec.rb
	spec/unit/source_spec.rb

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

jonmorehouse added a commit to jonmorehouse/gyp-cocoapods-mac-demo that referenced this issue Dec 14, 2013

dekelev added a commit to gigya/cocoapods-deintegrate that referenced this issue Feb 11, 2015

@dekelev dekelev referenced this issue in CocoaPods/cocoapods-deintegrate Feb 11, 2015

Merged

use native_targets instead of all targets to avoid crash #5

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