title: Xcode - add library to only one target
body: <p>I have a Swift project with a library that is not available for simulator. Therefore I created two targets, one to run on device, one in the simulator. I want to add the library only to the device target.</p>
  
  <p>What I did:</p>
  
  <ul>
  <li>added preprocessor macros: SIMULATOR=1 for simulator target, SIMULATOR=0 for device target</li>
  <li>I 'Link binary with Libraries' only for device target, 'Compile sources' also only on device target</li>
  <li>in code I use #if !SIMULATOR guards for the code related to library</li>
  </ul>
  
  <p>Still, when trying to build for simulator I get a linker error:</p>
  
  <p>Undefined symbols for architecture x86_64:
  Undefined symbols for architecture x86_64:
    "_OBJC_CLASS_$_VuforiaManager", referenced from:
        objc-class-ref in MainViewController.o</p>
  
  <p>What else do I need to do?</p>