Reputation: 7102
I am having a REALLY hard time using IOPowerSources, and the documentation along with it.
My issue is that, well, I can't figure out the darned imports for IOPowerSources. I am reading from:
The required imports are NOWHERE to be found, and it's driving me batty. Could someone PLEASE tell me what to import so that I may begin using IOPowerSources? Thanks :)
Upvotes: 3
Views: 1695
Reputation: 46020
#import <IOKit/ps/IOPowerSources.h>
You need to add the IOKit framework to your project. You can expand it in the files list and see all its headers.
You can also open the header file for the function by using the Open Quickly menu command in Xcode. Just start typing the function name and Xcode will show you matching headers and their paths.
I agree with you that the documentation is poor and should tell you the required headers.
Upvotes: 8