title: iOS compiler error: IOKit/IOKitLib.h not found
body: <p>I just tried to compile my xcode project for iPhone (using Phonegap).</p>
  
  <p>Compiling fails though with this message:</p>
  
  <pre><code>In file included from 
      /Users
      /mobile
      /Documents
      /dev
      /mobile
      /ios
      /TOMO
      /xcode
      /TOMO
      /MyProject.de-Prefix.pch:25 
      (#import &lt;UIKit/UIKit.h&gt;):
  In file included from 
      /Applications
      /Xcode.app
      /Contents
      /Developer
      /Platforms
      /iPhoneOS.platform
      /Developer
      /SDKs
      /iPhoneOS6.1.sdk
      /System
      /Library
      /Frameworks
      /UIKit.framework
      /Headers
      /UIKit.h:10 
      (#import &lt;UIKit/UIAccessibility.h&gt;):
  In file included from 
      /Applications
      /Xcode.app
      /Contents
      /Developer
      /Platforms
      /iPhoneOS.platform
      /Developer
      /SDKs
      /iPhoneOS6.1.sdk
      /System
      /Library
      /Frameworks
      /UIKit.framework
      /Headers
      /UIAccessibility.h:8 
      (#import &lt;CoreGraphics/CoreGraphics.h&gt;):
  In file included from 
      /System
      /Library
      /Frameworks
      /ApplicationServices.framework
      /Versions
      /A
      /Frameworks
      /CoreGraphics.framework
      /Headers
      /CoreGraphics.h:41 
      (#include &lt;CoreGraphics/CGDisplayConfiguration.h&gt;):
  
  /System
  /Library
  /Frameworks 
  /ApplicationServices.framework
  /Versions
  /A
  /Frameworks
  /CoreGraphics.framework
  /Headers
  /CGDisplayConfiguration.h:8:10: fatal error: 'IOKit/IOKitLib.h' file not found
  #include &lt;IOKit/IOKitLib.h&gt;
           ^
  1 error generated.
  </code></pre>
  
  <p>So, obviously both, UIKit.framework as well as CoreGraphics.framework require IOKit, so I added IOKit.framework as a linked binary in:</p>
  
  <pre><code>Project-&gt;Build Phases-&gt;Link Binary with Libraries
  </code></pre>
  
  <p>And it's definitely there (I cann see IOKit.framework in my project navigator).</p>
  
  <p>So, I clean and build and get the same error.</p>
  
  <p>What gives?</p>