title: Why is xcodebuild not building dependencies when testing?
body: <p>When I run <code>xcodebuild</code>, it crashes. It seems that it is not compiling the test target's dependency, which is the main app. The test target is called <code>NiknikTests</code>, while the app's target is called <code>WTATest3</code>.</p>
  
  <pre><code>Ld build/UninstalledProducts/NiknikTests.xctest/NiknikTests normal i386
      cd "/Users/ethen/.jenkins/workspace/Build NikNik"
      export IPHONEOS_DEPLOYMENT_TARGET=7.1
      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/ethen/Desktop/sbt/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/ethen/.jenkins/workspace/Build\ NikNik/build/Release-iphonesimulator -L/Users/ethen/.jenkins/workspace/Build\ NikNik/NiknikTests/TestLibraries/include/lib -F/Users/ethen/.jenkins/workspace/Build\ NikNik/build/Release-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/ethen/.jenkins/workspace/Build\ NikNik/build/NikNik.build/Release-iphonesimulator/NiknikTests.build/Objects-normal/i386/NiknikTests.LinkFileList -bundle_loader /Users/ethen/.jenkins/workspace/Build\ NikNik/build/Release-iphonesimulator/Niknik.app/Niknik -Xlinker -objc_abi_version -Xlinker 2 -force_load /Users/ethen/.jenkins/workspace/Build\ NikNik/NiknikTests/TestLibraries/include/lib/libOCMock.a -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/ethen/.jenkins/workspace/Build\ NikNik/build/NikNik.build/Release-iphonesimulator/NiknikTests.build/Objects-normal/i386/NiknikTests_dependency_info.dat -o /Users/ethen/.jenkins/workspace/Build\ NikNik/build/UninstalledProducts/NiknikTests.xctest/NiknikTests
  Undefined symbols for architecture i386:
    "_OBJC_CLASS_$_NNBoundaryLineModel", referenced from:
        objc-class-ref in NNBoundaryLineModelTests.o
       (maybe you meant: _OBJC_CLASS_$_NNBoundaryLineModelTests)
    "_OBJC_CLASS_$_NNConstant", referenced from:
        objc-class-ref in NNConstantTests.o
       (maybe you meant: _OBJC_CLASS_$_NNConstantTests)
    "_OBJC_CLASS_$_NNPlayerModel", referenced from:
        objc-class-ref in NNPlayerModelTests.o
       (maybe you meant: _OBJC_CLASS_$_NNPlayerModelTests)
  ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Here is my <code>xcodebuild</code> command:</p>
  
  <pre><code>xcodebuild \
  -target NiknikTests \
  -arch i386 \
  -configuration “Debug” \
  -sdk iphonesimulator \
  TARGETED_DEVICE_FAMILY="2" \
  ONLY_ACTIVE_ARCH=NO \
  clean install
  </code></pre>
  
  <p>When I run the tests from inside of Xcode, it works just fine.</p>
  
  <p>EDIT: This is showing the target dependency of <code>NiknikTests</code>. </p>
  
  <p><img src="https://i.stack.imgur.com/U6Cz9.png" alt="enter image description here"></p>
  
  <p>Why is it not building the target dependency?</p>