% pod --version
0.38.0.beta.1
% pod install
Updating local specs repositories
Analyzing dependencies
…
Downloading dependencies
Using AFNetworking (2.5.3)
…
Using iOS-Slide-Menu (1.4.6)
Generating Pods project
[!] An error occurred while processing the post-install hook of the Podfile.
undefined method `project' for #<Pod::Installer:0x007f9be5906fe0>
…/Podfile:73:in `block (2 levels) in from_ruby'
…/.rvm/gems/ruby-2.1.1@global/gems/cocoapods-core-0.38.0.beta.1/lib/cocoapods-core/podfile.rb:170:in `call'
…/.rvm/gems/ruby-2.1.1@global/gems/cocoapods-core-0.38.0.beta.1/lib/cocoapods-core/podfile.rb:170:in `post_install!'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/installer.rb:732:in `run_podfile_post_install_hook'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/installer.rb:720:in `block in run_podfile_post_install_hooks'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/user_interface.rb:140:in `message'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/installer.rb:719:in `run_podfile_post_install_hooks'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/installer.rb:146:in `block in generate_pods_project'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/user_interface.rb:59:in `section'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/installer.rb:141:in `generate_pods_project'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/installer.rb:101:in `install!'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/command/project.rb:101:in `run'
…/.rvm/gems/ruby-2.1.1@global/gems/claide-0.8.2/lib/claide/command.rb:312:in `run'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/lib/cocoapods/command.rb:48:in `run'
…/.rvm/gems/ruby-2.1.1@my-project/gems/cocoapods-0.38.0.beta.1/bin/pod:44:in `<top (required)>'
…/.rvm/gems/ruby-2.1.1@my-project/bin/pod:23:in `load'
…/.rvm/gems/ruby-2.1.1@my-project/bin/pod:23:in `<main>'
…/.rvm/gems/ruby-2.1.1@my-project/bin/ruby_executable_hooks:15:in `eval'
…/.rvm/gems/ruby-2.1.1@my-project/bin/ruby_executable_hooks:15:in `<main>'
With the stable version of cocoapods, I get a different error:
% pod install
Analyzing dependencies
CocoaPods 0.38.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
…
Downloading dependencies
Using AFNetworking (2.5.3)
…
Using iOS-Slide-Menu (1.4.6)
Generating Pods project
2015-06-27 10:24:39.290 ruby[61361:5915470] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8123.33/IDEFoundation/Initialization/IDEInitialization.m:590
Details: Assertion failed: _initializationCompletedSuccessfully
Function: BOOL IDEIsInitializedForUserInteraction()
Thread: <NSThread: 0x7fe48b6d3010>{number = 1, name = main}
Hints: None
Backtrace:
0 0x000000010ad6f047 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x000000010ad6e7d4 _DVTAssertionHandler (in DVTFoundation)
2 0x000000010ad6ea40 _DVTAssertionFailureHandler (in DVTFoundation)
3 0x000000010ad6e9a2 _DVTAssertionFailureHandler (in DVTFoundation)
4 0x000000010c1481a9 IDEIsInitializedForUserInteraction (in IDEFoundation)
5 0x00000001100b7a5d +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
6 0x00000001100b95e2 +[PBXProject projectWithFile:errorHandler:] (in DevToolsCore)
7 0x00007fff9491cf44 ffi_call_unix64 (in libffi.dylib)
zsh: abort pod install
@intelliot as detailed in the CHANGELOG (https://github.com/CocoaPods/CocoaPods/releases/tag/0.38.0.beta.1), the object passed to the Podfile post-install hook has changed.
How can I fix this error? I couldn't find any mention of Installer
or Hooks
in my git repo.
you probably just want to change project
to pods_project
Cool - that fixed the first error - but now even cocoapods 0.38.0.beta.1 gives me this error:
% pod install
Updating local specs repositories
Analyzing dependencies
…
Pre-downloading: `FLEX` from `https://github.com/intelliot/FLEX.git`, commit `b797baa3efeffe73ab1d6ea6aaeb55cc05ff6422`
Pre-downloading: `KIF` from `https://github.com/kif-framework/KIF.git`, commit `63d20ad162e36248de4f183c0bfd7d6822b39573`
…
Downloading dependencies
Using AFNetworking (2.5.3)
…
Using iOS-Slide-Menu (1.4.6)
Generating Pods project
2015-06-28 15:47:04.671 ruby[67384:6575582] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8123.33/IDEFoundation/Initialization/IDEInitialization.m:590
Details: Assertion failed: _initializationCompletedSuccessfully
Function: BOOL IDEIsInitializedForUserInteraction()
Thread: <NSThread: 0x7fd78408e980>{number = 1, name = main}
Hints: None
Backtrace:
0 0x000000010536a047 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x00000001053697d4 _DVTAssertionHandler (in DVTFoundation)
2 0x0000000105369a40 _DVTAssertionFailureHandler (in DVTFoundation)
3 0x00000001053699a2 _DVTAssertionFailureHandler (in DVTFoundation)
4 0x00000001067481a9 IDEIsInitializedForUserInteraction (in IDEFoundation)
5 0x000000010a6b7a5d +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
6 0x000000010a6b95e2 +[PBXProject projectWithFile:errorHandler:] (in DevToolsCore)
7 0x00007fff9491cf44 ffi_call_unix64 (in libffi.dylib)
zsh: abort pod install
run gem install xcodeproj
and pod install
again ;)
:+1:
@segiddins @mrackwitz is there a reason the project
property wasn't deprecated?
Right now I'm testing 0.38.0.beta1 before making my team upgrade, but I have to maintain a separate Podfile because of this change.
@Benuuu: The reason for that is that we made a major conceptual change in how we provide access for advanced users to hook into the installation process, as documented in #3648. We could get rid of the whole proxy layer, which was out of sync, and is now even more with the changed introduced in the last minor release. It would have cost a lot effort to provide that in a backwards-compatible manner. Sorry for you personally for the inconvenience at this place. Sometimes we need to make hard decision and get rid of "debt" to continue moving forward.
Good that you were able to find a workaround solution for now. I wanted to write a section for the release blog post on how to migrate and map prior used calls to the new API to make it easier, seems like in this special case it would been helpful to have that earlier in place.
Don't know if this is the right thing to do, but after using the beta, I had to add this to my Gemfile in order to get the previous version of CocoaPods to work again:
gem 'xcodeproj', '~>0.24.3'
I had same problem upgrading to 0.38.0.beta.2
My hook:
post_install do |installer|
# Disable "Application Extension API Only" flag in pods
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = false
end
end
end
It now failed with error:
## Error
RuntimeError - [Xcodeproj] Unrecognized object `1146614241716823128` in #tree_hash_to_path
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:96:in `tree_hash_to_path'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:87:in `block in tree_hash_to_path'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:86:in `each'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:86:in `each_with_object'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:86:in `tree_hash_to_path'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:87:in `block in tree_hash_to_path'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:86:in `each'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:86:in `each_with_object'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:86:in `tree_hash_to_path'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:79:in `path_component_for_object'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:51:in `block (2 levels) in generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:50:in `each'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:50:in `block in generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:49:in `each'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:49:in `generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:46:in `block in generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:44:in `each'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:44:in `generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:51:in `block (2 levels) in generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:50:in `each'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:50:in `block in generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:49:in `each'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:49:in `generate_paths'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project/uuid_generator.rb:12:in `generate!'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/xcodeproj-0.26.1/lib/xcodeproj/project.rb:337:in `predictabilize_uuids'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/installer.rb:647:in `block in write_pod_project'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/user_interface.rb:140:in `message'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/installer.rb:642:in `write_pod_project'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/installer.rb:155:in `block in generate_pods_project'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/user_interface.rb:59:in `section'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/installer.rb:149:in `generate_pods_project'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/installer.rb:109:in `install!'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/command/project.rb:101:in `run'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/lib/cocoapods/command.rb:48:in `run'
/Users/siuying/.rvm/gems/ruby-2.1.5/gems/cocoapods-0.38.0.beta.2/bin/pod:44:in `<top (required)>'
/Users/siuying/.rvm/gems/ruby-2.1.5/bin/pod:23:in `load'
/Users/siuying/.rvm/gems/ruby-2.1.5/bin/pod:23:in `<main>'
/Users/siuying/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/Users/siuying/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>
I have a quick glance on the xcodeproj API, build_settings should still work as before?
@siuying that's an issue with Xcodeproj
, please open up an issue over there
@segiddins Thanks, will do.
@segiddins
you probably just want to change project to pods_project
could u pls explain this for more details? i am really frustrated about (undefined method `project' for #Pod::Installer:0x007f9be5906fe0 this problem
@changpianji change where you call the project
method to use the pods_project
method instead.
@siuying Have you resolved the issue you last posted? I am getting the same error.
@stevelaw the issue is tracked at https://github.com/CocoaPods/Xcodeproj/issues/286, I'm currently pinned at older version
@changpianji change where you call the project method to use the pods_project method instead.
For those still not sure what to do (not being familiar with Ruby, cocoapods or Xcode), change the installer.project.targets.each
line in your _podfile_ in xcode to install.pods_project.targets.each
This worked for me.
sudo xcode-select -r fixed the issue
Changing to pods_project fixes, but then I get build_configurations failure. cocoapods is totally broken right now, kind of sad.
@intelliot l have changed project to pods_project.pod install again,find [!] Failed to find 'Pods-MasonryTestsLoader-Masonry' target.how should l do?
@lituanhui77 I'm not encountering this issue any longer, and don't know what you should do. Maybe try creating a new issue.
My problem was when I installed a new version of Xcode, and when I did pod install
always the console get me back
Generating Pods project
[1] 6472 abort pod install
Then I did gem install xcodeproj
and I tried again and It worked
I keep getting this error, everything was working fine, suddenly this started showing up on pod install.
I am using xcode 8.3.2, on MacOS Sierra 10.12.4. I had to branch my project in for unique feature sets. But all was working fine till this morning. Not sure what's happening here.
Generating Pods project
[!] An error occurred while processing the post-install hook of the Podfile.
`undefined local variable or method `ions' for #<Pod::Podfile:0x007fd47154e7a8>
/{pathtoproject}/Podfile:16:in `block (4 levels) in from_ruby'
/{pathtoproject}/Podfile:15:in `each'
/{pathtoproject}/Podfile:15:in `block (3 levels) in from_ruby'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/podfile.rb:179:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/podfile.rb:179:in `post_install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:668:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:656:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:142:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:655:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:181:in `block in generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:178:in `generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:115:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```
Post install hook is running within your Podfile
specifically line 16 as the stacktrace says.
Most helpful comment
run
gem install xcodeproj
andpod install
again ;)