title: How do you use link_with in Cocoapods to minimise the time it takes to do `pod install`?
body: <p>I <strong>just about</strong> get what <code>link_with</code> does in Cocoapods. The documentation is very very brief about this option:</p>
  
  <pre><code>Specifies the target(s) in the user’s project that this Pods library should be linked in.
  </code></pre>
  
  <p>(from <a href="http://guides.cocoapods.org/syntax/podfile.html#link_with" rel="nofollow">http://guides.cocoapods.org/syntax/podfile.html#link_with</a>)</p>
  
  <p>The only examples assume the user isn't using target-specific pods...</p>
  
  <pre><code>link_with 'MyApp'
  </code></pre>
  
  <p>Ooookay then. So what is the expected behaviour of using this in a target-specific Pods library? Why is the Pods library tied to a specific target and yet has the potential to be linked to others?</p>
  
  <p>e.g. what does the following mean?</p>
  
  <pre><code>target 'FirstTarget' do
    link_with 'SecondTarget', 'ThirdTarget'
    pod ...
  end
  </code></pre>
  
  <p>I really want to know, because the way I'm currently grouping pods up at the moment makes Cocoapods <code>pod install</code> <em>really</em> slow. Just as an example, here's a bunch of common test-related pods being used in multiple targets:</p>
  
  <pre><code>def test_essentials
    pod 'Specta', :git =&gt; 'https://github.com/specta/specta.git', :branch =&gt; '0.3-wip'
    pod 'Expecta'
    pod 'OCHamcrest'
    pod 'OCMockito'
    pod 'OCMock'
  end
  
  target 'MyProjSpecs', :exclusive =&gt; true do
    test_essentials
    ...
  end
  
  target 'MyProjLogicSpecs', :exclusive =&gt; true do
    test_essentials
    ...
  end
  </code></pre>
  
  <p>Of course my project itself has more targets — about 6 more. Using this pattern duplicates a lot of target definitions and makes it really unclear what's linked to what. In total it takes about 3 minutes in the <code>Generating Pods Project</code> and <code>Integrating client project</code> phases.</p>
  
  <p>Am I doing something wrong?</p>