title: Building targets in podfile post_install hook
body: <p>In my podfile I am using a post install hook to add build phase scripts to the Pods project targets and build each of the targets. The problem I am having is I that am using</p>
  
  <p><code>system "xcodebuild -target #{target.name} -sdk iphonesimulator"</code></p>
  
  <p>which is building the current Pods project as I am in the Pods directory as opposed to the pods project being generated by the podfile and passed into the post install hook. So I'm wondering if anyone has come across a way or a ruby gem that allows building of a target in the post_install hook? Iv been trying for a few days and haven't found any workaround and the only solution I can find means running pod install twice, first to add the scripts and integrate the project and second to build the targets to run those scripts which is less than ideal.</p>
  
  <pre><code>post_install do | installer |
     installer.project.targets do |target|
        // adding build script to target
        target.build() &lt;-- this is what i need, some way to build this target.
     end
  end
  </code></pre>
  
  <p>Thanks.</p>