Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

patent10021

macrumors 68040
Original poster
Apr 23, 2004
3,537
813
The Flux app got pulled from the app store because it was using private APIs. What APIs and how do you access private APIs? IS there a list of private APIs somewhere? If converting Kelvin temperature is a normal function for weather and other apps why was it banned? I guess the API is directly related to the brightness settings? So the API is the API that controls display brightness? [[UIScreen mainScreen] setBrightness:0.1] ????

How do you control Kelvin temperature settings in Swift/Obj-C?
 
A private API is one that isn't publicly defined and for Apple's use only. Depending on what they do, many of them will get a public release in the future. Apple will sometimes create private APIs to test them out first, then release them when they are ready for public use.

Flux wasn't just changing the brightness, it was directly manipulating color schemes to allow/reduce the amount of certain colors of the iPhone screen. (Less blue at night)

Private APIs are found by poking around official Apple Apps.

In my experience, if you can achieve a desired effect that Apple created a Private API for (without actually using the Private API), then Apple will still allow the app to get published.
 
Private APIs include APIs in any private frameworks and any classes that aren't documented and methods in Public classes that aren't documented. It is possible to learn what some of these are by various means. Because these private APIs may change or may provide access to things Apple doesn't want developers to touch Apple has a strict policy against third party developers using private APIs. As part of that policy they have tools that inspect any app submitted to the app store and determine if these apps use any private APIs.

You can inspect some private APIs here for instance:

https://github.com/nst/iOS-Runtime-Headers
 
How do you look inside or find an API? Where would it usually give you a clue? plist?
 
Well, all the public APIs are in Apple's documentation including the header files. I provided a link that shows both public and private APIs.
 
Well, all the public APIs are in Apple's documentation including the header files. I provided a link that shows both public and private APIs.
ok yeah of course the public APIs are all over the place. I didn't catch your link for the private ones. Thanks man. Cheers.

Apple doesn't list the private APIs though so is the GitHub link a collection of private APIs that just one person found or is it an ongoing collection amassed by everyone? What's the significance of the title "iOS Runtime Headers?" APIs are monitored and found in the runtime headers?
 
Because of the dynamic nature of Objective-C compiled programs have a lot of information about the classes present. Those headers at that link are generated by a tool called class-dump or a similar tool that allows one to process all the system libraries. The headers are emitted by the tool and resemble the actual layout of the classes in the libraries with all private methods and ivars revealed.

Look closely at the header he shows for some class that you're familiar with. Apple uses _leading _underscores on private method names in an attempt to avoid method name conflicts.
 
Because of the dynamic nature of Objective-C compiled programs have a lot of information about the classes present. Those headers at that link are generated by a tool called class-dump or a similar tool that allows one to process all the system libraries. The headers are emitted by the tool and resemble the actual layout of the classes in the libraries with all private methods and ivars revealed.

Look closely at the header he shows for some class that you're familiar with. Apple uses _leading _underscores on private method names in an attempt to avoid method name conflicts.
Found the app and guides. Quite straight forward! Having access to these areas helps me with my programming too! Great stuff thanks!

p.s. Are there similar tools for Android? Probably even more right?
 
Android itself is open source so you can read the source code if you want.

You can look up jar tool and java decompiler to snoop into compiled jars.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.