Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access to temps and fan data from within sandbox on OSX?

Tags:

xcode

macos

iokit

How can I access SMC information - such as CPU temps and fan speeds, from within an app sandbox (to be app store compliant). I can't see an available API, and yet there are apps on the app store that accomplish this functionality - for instance: https://itunes.apple.com/gb/app/monity/id915542151?mt=12

I can get my app to work fine outside of a sandbox (it uses IOKit Framework), but as soon as I put it in the sandbox to make it app store compliant it's dead as there's no available entitlement.

If there's no obvious way to achieve this, is there a means of using some sort of temporary entitlement?

Edit - I can get it to work with the following temporary entitlement:

com.apple.security.temporary-exception.sbpl string (allow iokit-open)

However I do not believe that this would be approved by apple.

like image 975
Rhys Lewis Avatar asked Nov 24 '25 08:11

Rhys Lewis


1 Answers

Running a quick dump of the Monity widget's symbol table, it would appear to use this older iStat implementation, which in turn is mostly based on the IOKitLib userspace API (as opposed to IOKit itself). Does this differ from what you had been attempting? (Care to provide a few more details?)

like image 73
Sam R. Avatar answered Nov 26 '25 22:11

Sam R.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!