How to import IOPMLib.h from IO kit?
-
29-10-2019 - |
문제
I am trying to wake a Mac up with the following code,
CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
CFDateRef wakeFromSleepAt = CFDateCreate(NULL, currentTime + 60);
IOReturn returnCode = IOPMSchedulePowerEvent(wakeFromSleepAt, NULL, CFSTR(kIOPMAutoWakeOrPowerOn));
I'm having trouble finding the right framework/header to import.
I'm using #import <IOKit/pwr_mgt/IOPMLib.h>
but the complier still complains. Any suggestions? Thanks.
Edit
I am getting the following error message
Undefined symbols:
"_IOPMSchedulePowerEvent", referenced from:
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow