Does using IOKit in mac violates app store terms?

I saw a comment in a github project stating that None of this will work for iOS as I/O Kit is a private framework there. Is that also true for mac also?

Answered by DTS Engineer in 154416022

When I mentioned “I/O Kit headers” earlier, I meant “I/O Kit headers in the public SDK”. In the specific case of

IOPSGetTimeRemainingEstimate
, that routine is declared in
<IOKit/IOPowerSources.h>
in the public macOS 10.11 SDK and, as such, should be fine in a Mac App Store app.

Keep in mind that there may be other Mac App Store restrictions, either technical restrictions from the sandbox or business restrictions from the App Store Review Guidelines, that might apply in this specific case. I don’t work for App Review and can’t give you a definitive answer as to what will or won’t be allowed in the store. However, the general rule is that, if the API you’re using is a public API, and you’re using it in the way that it was intended to be used, you should be OK.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I/O Kit is a public API and thus can, in general, be used by Mac App Store apps. There are, however, some caveats.

The first is that many I/O Kit operations, like changing registry values, require privileges, and that’s something that’s specifically not allowed in Mac App Store apps.

The second is that not everything you see in the I/O registry is considered API. The general guideline here is that properties with a constant defined in the I/O Kit headers are API, but other properties are not. Using such properties would be grounds for your app to be rejected. Moreover, it’s also a compatibility risk and, as such, is unsupported.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

So basically I shouldn't try to retrieve information about CPU,Battery,Ram etc if I want to submit the app to store. Am I right?

To answer that I’ll need information about the exact properties you’re accessing.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Like IOPowerSources.h to get information about battery like time remaining (using IOPSGetTimeRemainingEstimate) etc.

From a 2008 version I have... IOPowerSources.h (looks to be Public) comments:


/ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.

* * @APPLE_LICENSE_HEADER_START@ *

* This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License

* Version 2.0 (the 'License'). You may not use this file except in compliance with the License.

* Please obtain a copy of the License at

* http://www.opensource.apple.com/apsl/

* and read it before using this file.



Notice it's included headers, <cdefs.h>, which carries the same disclaimer.

Accepted Answer

When I mentioned “I/O Kit headers” earlier, I meant “I/O Kit headers in the public SDK”. In the specific case of

IOPSGetTimeRemainingEstimate
, that routine is declared in
<IOKit/IOPowerSources.h>
in the public macOS 10.11 SDK and, as such, should be fine in a Mac App Store app.

Keep in mind that there may be other Mac App Store restrictions, either technical restrictions from the sandbox or business restrictions from the App Store Review Guidelines, that might apply in this specific case. I don’t work for App Review and can’t give you a definitive answer as to what will or won’t be allowed in the store. However, the general rule is that, if the API you’re using is a public API, and you’re using it in the way that it was intended to be used, you should be OK.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Does using IOKit in mac violates app store terms?
 
 
Q