title: Calling method on category included from iPhone static library causes NSInvalidArgumentException
body: <p>I have created a static library to house some of my code like categories.</p>
  
  <p>I have a category for UIViews in "UIView-Extensions.h" named Extensions.</p>
  
  <p>In this category I have a method called:</p>
  
  <pre><code>- (void)fadeOutWithDelay:(CGFloat)delay duration:(CGFloat)duration;
  </code></pre>
  
  <p>Calling this method works fine on the simulator on Debug configuration. </p>
  
  <p>However, if try to run the app on the device I get a NSInvalidArgumentException:</p>
  
  <pre><code>[UIView fadeOutWithDelay:duration:]: unrecognized selector sent to instance 0x1912b0
   *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIView fadeOutWithDelay:duration:]: unrecognized selector sent to instance 0x1912b0
  </code></pre>
  
  <p>It seems for some reason UIView-Extensions.h is not being included in the device builds.</p>
  
  <hr>
  
  <p><strong>What I have checked/tried</strong></p>
  
  <p>I did try to include another category for NSString, and had the same issue.</p>
  
  <p>Other files, like whole classes and functions work fine. It is an issue that <strong><em>only</em></strong> happens with categories.</p>
  
  <p>I did a clean all targets, which did not fix the problem.</p>
  
  <p>I checked the static library project, the categories are included in the target's "copy headers" and "compile sources" groups.</p>
  
  <p>The static library is included in the main projects "link binary with library" group. </p>
  
  <p>Another project I have added the static library to works just fine.</p>
  
  <p>I deleted and re-added the static library with no luck</p>
  
  <p>-ObjC linker flag is set</p>
  
  <p>Any ideas?</p>
  
  <hr>
  
  <p><strong>nm output</strong></p>
  
  <pre><code>libFJSCodeDebug.a(UIView-Extensions.o):
  000004d4 t -[UIView(Extensions) changeColor:withDelay:duration:]
  00000000 t -[UIView(Extensions) fadeInWithDelay:duration:]
  000000dc t -[UIView(Extensions) fadeOutWithDelay:duration:]
  00000abc t -[UIView(Extensions) firstResponder]
  000006b0 t -[UIView(Extensions) hasSubviewOfClass:]
  00000870 t -[UIView(Extensions) hasSubviewOfClass:thatContainsPoint:]
  000005cc t -[UIView(Extensions) rotate:]
  000002d8 t -[UIView(Extensions) shrinkToSize:withDelay:duration:]
  000001b8 t -[UIView(Extensions) translateToFrame:delay:duration:]
           U _CGAffineTransformRotate
  000004a8 t _CGPointMake
           U _CGRectContainsPoint
           U _NSLog
           U _OBJC_CLASS_$_UIColor
           U _OBJC_CLASS_$_UIView
           U ___CFConstantStringClassReference
           U ___addsf3vfp
           U ___divdf3vfp
           U ___divsf3vfp
           U ___extendsfdf2vfp
           U ___muldf3vfp
           U ___truncdfsf2vfp
           U _objc_enumerationMutation
           U _objc_msgSend
           U _objc_msgSend_stret
           U dyld_stub_binding_helper
  </code></pre>