title: linking objective-c categories in a static library
body: <p>I am developing a plugin for an iOS application. I am compiling it into a .a file which is then used by the main xcode project.</p>
  
  <p>So far I have create a category of the UIDevice class in this library. When I run the main project using this library it crashes due to an unrecognized selector</p>
  
  <p>-[UIDevice platform]: unrecognized selector sent to instance</p>
  
  <p>platform is one of the fuinctions I added via the category.</p>
  
  <p>So I thought it wasn't linking those functions at all and added a c function to the same file as the UIDevice category then called it from my code .</p>
  
  <p>This time the main project ran fine... So I thought maybe it was something else i did and removed the C function. But lo and behold it crashed again due to unrecognized selector..</p>
  
  <p>My questions:
  Why does xcode ignore the category definition unless I call a function declared in the same file?</p>
  
  <p>Is there an xcode setting i can change to make it include these methods from the UIDevice category regardless of whether I call a function from that file or not?</p>
  
  <p>cheers</p>