我想从沙盒应用访问AppleSMC设备, 有谁知道我应该使用什么权利来访问温度传感器和FANs RPM?
这是我用来访问它的代码:
kern_return_t result;
mach_port_t masterPort;
io_iterator_t iterator;
io_object_t device;
/*result =*/ IOMasterPort(MACH_PORT_NULL, &masterPort);
CFMutableDictionaryRef matchingDictionary = IOServiceMatching("AppleSMC");
result = IOServiceGetMatchingServices(masterPort, matchingDictionary, &iterator);
提前致谢
答案 0 :(得分:2)
AFAIK AppleSMC不被视为API,因此没有相应的权利允许您访问它。 (来源Apple Developer Forum message 1082393)
AppStore中可能仍有应用程序没有沙盒,因为稍后会引入沙盒。有关详细信息,请参阅答案“circumvent sandbox”。
这也适用于问题“MagicanPaster”中的应用程序,该应用程序在2011年5月上次更新,早在沙箱实施之前。
您可以在Mac App Store以外的地方分发您的应用,brief overview by matt gemmell即可。