title: XCTest does not link iOS frameworks
body: <p>I'm running iOS simulator unit tests on the command line using <code>xctest</code>. First I build the target:</p>
  
  <pre><code>xcodebuild -project "build/MyApp.xcodeproj" -target "MyApp Unit Tests" -configuration "Debug" -sdk "iphonesimulator" build
  </code></pre>
  
  <p>And then run <code>xctest</code> on the test bundle:</p>
  
  <pre><code>xcrun xctest "build/build/Debug-iphonesimulator/MyApp Unit Tests.xctest"
  </code></pre>
  
  <p>This works fine, and can link frameworks that are in /System/Library/Frameworks like Security. But <code>xctest</code> breaks as soon as I add an iOS SDK framework like MobileCoreServices, giving me:</p>
  
  <pre><code>Library not loaded: /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
  </code></pre>
  
  <p>The unit tests run fine in Xcode, and the unit test target includes <code>$(PLATFORM_DIR)/Developer/Library/Frameworks</code> in its Frameworks Search Paths.</p>
  
  <p>Anybody know the right way to make <code>xctest</code> find iOS frameworks?</p>