Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Could not access pods_project on post_install hooks when incremental_installation is enabled #8604
What did you do?
install! 'cocoapods', :generate_multiple_pod_projects => true, :incremental_installation => true target 'MyApp' do use_frameworks! pod 'Result' end post_install do |installer| installer.pods_project.targets.each do |target| # do something end end
Before submitting this PR, (1.7.0beta.2) this
What did you expect to happen?
We should access
What happened instead?
require 'pry' workspace 'CocoaPodsSandbox.xcworkspace' install! 'cocoapods', :generate_multiple_pod_projects => true, :incremental_installation => true target 'CocoaPodsSandbox' do use_frameworks! pod 'Result' end post_install do |installer| installer.pods_project.targets.each do |target| end end
Project that demonstrates the issue
We could just open the container project, but I think that sets a bad precedent since others may have similar complaints about other individual projects being nil which would then require us opening all projects every installation (very inefficient for large projects).
Also post install hooks should only need to operate over the changed set of projects or targets to apply whatever changes are needed. The only case where this fails is if someone adds a post install hook to a specific pod that won't be regenerated during the next installation, in which