So, in this article, I tried to write down how I import IOKit framework into a Xcode project.
Things you need are：
- Xcode 8 (This sample was builded on Xcode version 8 in macOS 10.12)
- iOS SDK (It should be installed with your Xcode)
- Trident – IOKit header files
When you try to use IOKit, for instance：
Step 1：Import IOKit Framework
Different from IOKit as a libraries on iOS 5, Apple change IOKit from library into framework on iOS 7.
So first of all, we need to import the IOKit framework in Xcode.app into our project
We need “iPhoneOS.platform” recently, the path is：
Find the IOKit.framework on the path I mentioned above and add it, after you finish it, it will show up in the area of “Link Frameworks and Libraries”
Step 2：Add header files of IOKit
I read some article on internet said that header files of IOKit framework will be at
but I couldn’t find any header files in the path, so I tried another way.
I use the header files in Trident and add it to my project.
First, download it form GitHub, what we need is a folder in it
Trident-master/Headers/IOKit called IOKit
Step 3：Make Xcode find header files you added
Then it done.
Remember to clean your project (CMD+SHIFT+K) and build it again