简体   繁体   中英

How to set temporary entitlements for IOKit properties?

I'm using sandboxing in for my Mac app. I need to set a property to IOKit like so,

IORegistryEntrySetCFProperty(reg, CFSTR("IORequestIdle"), kCFBooleanTrue);

Because of app sandboxing, the system will not allow me to do it. If I turn off app sandboxing, the property is set properly.

The error message I get in the console is as follows, deny iokit-set-properties IORequestIdle

Is there a way for me to set a temporary entitlement so that I can do this properly. If so, how do I go about doing so?

Short answer is no. If you could turn entitlements on and off as you please, then the sandbox serves no purpose.

Unfortunately, this probably means you cannot do what you are trying to do. If there isn't a work around, then you won't be able to submit your app to the app store after March 1, 2012.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM