Regarding Apple's use of private API in iBooks


Marco Arment raised a flag on the iPad App Store field today and called foul over Apple using private APIs in their first-party iBooks app.

Private APIs are meant to be exclusive to Apple's OS and built-in apps (like Safari, Mail, iPod, etc.) because they're experimental, transitional, or otherwise not something that developers should count on being there in the same form in the next OS update. They're still works in progress. Public APIs on the other hand are an agreement between Apple and developers that they can be used to build apps safely and confidently because they won't be changed in a future update (Apple won't break existing apps).

Up until now, Apple has played by their own rules and all of the apps they've not built into the iPhone (Remote, Keynote Remote, MobileMe Gallery, etc.) have been based on public, no private APIs. Reportedly Pages, Keynote, and Numbers were careful to stick to public APIs as well. That's only fair. If Apple could do things in the App Store that competitors like QuickOffice or Documents to Go couldn't, developers could rightly call it unfair, and that could lead to trouble.

However, according to Arment and backed up by oldmanuk, iBooks does make use of private APIs for functions like the in-app brightness control, a feature that would get a competitor like Amazon's Kindle app rejected from the App Store.

Developers are understandably upset about this seeming break in Apple's policy.

Thing is, Google famously got away with using private API for their Google Mobile App in late 2008 only to have those API made nice and legal in 2009.

So for TiPb's part, we're going to wait for the iPhone 4.0 event in 2 days and see if the private vs. public API landscape doesn't change when the next SDK beta hits the streets.

[Thanks Dev for the tip]

Rene Ritchie

Editor-in-Chief of iMore, co-host of Iterate, Debug, ZEN and TECH, MacBreak Weekly. Cook, grappler, photon wrangler. Follow him on Twitter,, Google+.

More Posts



← Previously

Verizon has asked if they can carry the iPhone

Next up →

Will the iPad blend?

There are 32 comments. Add yours.

scientist88 says:

some people just make too big of a deal about this! let Apple do what they want with they're own products!
and other people shouldnt be hypocritical with everybody illegally jailbreaking theyre iPhones, iPods, and iPads!

The iNews Blog says:

Arnab, jailbreaking isn't illegal. I'm pretty sure nobody has ever been arrested or sued because they jailbroke. Apple just tries to scare people. SUre you can gain access to illegal things by jailbreaking, but modifying something you own isn't.

Rajiv says:

Apple could just build the iBooks app into iPhone OS 4.0 and solve the problem by allowing the private API use.

sting7k says:

There are flashlight apps that let you adjust the screen brightness...

cardfan says:

Apple just wants to be able to update iBooks without having to do an OS update. Otherwise it'd be part of the OS.

Wii1059 says:

@sting7k It doesn't lower the screen brightness, just the brightness of that app. It's different.

dloveprod says:

Isn't the while purpose of private api's is so that only apple has access to them

Ambient711 says:

Jailbreaking is illegal according to ATT. It says that modifing the OS is a breach of the customer agreement.

The Reptile says:

Maybe it's a private API until Thursday. I realize that 4 days is forever in the Internet age but in the grand scheme of things it's just a blip.

(Copy of) Dev says:

That is more of a side effect than the primary purpose. There is an old saying about public APIs -- "Software is like sex -- make one mistake, and you have to support it forever." Think of private APIs as safe sex -- Apple can change them, break them, do whatever they want to them, and, since they are private, they do not have to worry about 3rd party applications blowing up. Private APIs are a good, necessary thing.
We only get into problems when private APIs provide features or better performance than the publicly available APIs, and the platform provider (Apple) uses private APIs in their applications. While obviously the iPhone is not a monopoly the way Windows is (yet), this exact behavior -- using a private API from the OS "department" in an application that competes with others on the platform -- was what got Microsoft in trouble with the DOJ in the late 1990s.
In this specific case, from what I have read, one issue is that the iBooks app allows you to control the brightness from within the app. (Somebody with an iPad confirm.) This is a very nice feature for a book reader to have. Kindle can NEVER have this feature, because the API that controls brightness is private. If Amazon were to submit it, it would be flat-out rejected. iBooks therefore has a competitive advantage over Kindle and other book readers, and Apple is no longer is creating an even playing field in the iPhone marketplace.
While I sincerely doubt any DOJ investigation is forthcoming yet, the behavior still stinks, and makes developers more leery than anything Apple has done to date. I expect people to start asking Apple what categories of Apps are coming out of Apple, because we will feel we cannot compete with Cupertino, just like we asked Redmond back in the day.
The iPhone still rocks, and Objective C, once you get past those weird square brackets, is quite pleasant, but this behavior is discouraging, to say the least. Marco's article implies that Pages and Keynote are playing by the rules, so hopefully the iBooks team was an isolated case that will be quickly corrected; otherwise, the discouragement will start to take hold, and the ecosystem will (eventually) suffer.

(Copy of) Dev says:

that is my hope as well, though, without the sort of public "we're sorry for the blip, and we pledge our apps teams will play by apps rules" statement Marco suggests, some bit of perception damage will linger in the 3rd party ecosystem.

jasonact says:

To those who have asked why iBooks wasn't included in the OS, I believe the prevailing opinion is that it has to do with international licensing. Apple doesn't have international deals with book publishers, so they can't put the iBooks app on iPads sold outside of the US. Instead of building an US-version and an international version of the OS, it made more sense to make it a downloadable app that would only be made available in the US App Store.
That said, I will be shocked if the offending Private APIs aren't made public with the 4.0 SDK.

Hakala says:

My honest opinion would be, it's not like trying to do two things at once on a windows vista, it's a simple click of a SINGLE button (maybe twice if you've got your homescreen switched) and then a quick tap-tap-slide-click-tap. At the very most. The ipad is most likely very quick to switch apps compared to iPhone so really, if you must change the brightness that much from where you already prefer it, just go through it manually.
Obviously developers most often share anoter perspective. If apple doesn't change the API from private to public, someone will comment (complain) to apple and most likely after a few emails, Jobs will reply back to one, and they will "like magic like the ipad!" become public.
The above is simply this:
Opinion Premonition.

Danyul says:

I actually think there may be private APIs used to integrate Pages and Mobile Safari on the iPad- if you've installed Pages and you point your Mobile Safari to a URL of an MS Word document, you get a little option on the upper right to open the document in Pages. You don't have the option to open it in any other document-editors or viewers you might have installed. This blog ( already documented it and has a screenshot. So, anyone at TIPB, or any of its readers, know whether this feature makes use of a private API? Even if it isn't a private API, it's still using the closed nature of Safari and its status as the preferred iPad Browser to give a leg up to Pages rather than any other editing/viewing software.

Entrical says:

Sbaettings ftw. Adjust brightness on the fly

Don says:

I hope the DOJ notices Apple and nails their gluts to the wall. Apple is 100000 x worse than Microsoft ever dared to be.

jb says:

"If Apple could do things in the App Store that competitors like QuickOffice or Documents to Go couldn’t, developers could rightly call it unfair, and that could lead to trouble."
LOL are you kidding me!? its Apple's Store, they can do whatever they want, they're the ones who are standing in front of the gates to the app store anyways. They're the ones who have just put you in business as an app developer and now your mad cause their using their own private api's in their device, on their application..

stuffradio says:

@jb It's called anti-competitor law. Something you Apple fans should know about because you scream at Microsoft when they do something, but cry foul or lame or hurl insults at other people when Apple does something bad and the people say Apple is doing something bad.
Apple needs to OPEN up, THAT will make them the best ever.

iphonelibya says:

السلام عليكم
لن تشتغل هذة الخاصية

antonioj says:

Jailbreaking is not illegal...yes you loose your warranty, but that´s it. No one will go to jail for doing it.

Lady Kaede says:

iBooks is a 'built-in' app . . . Apple just didn't get it 'built-in' in time for launch. Whole debate goes away shortly.

solar_plexus says:

Iwas JUST typing the same thing when I double checked and saw your post.
Right On.
The Tech Community gave birth to an alien baby when Microsoft used un-published APIs in Office. But when the golden Child does it, its fine. They can just build those apps into the OS and all will be fine.

Ian says:

Wait... so this boils down to iBooks allowing the user to adjust screen brightness from within the app and the Kindle app can't? Hm... People have said the Kindle app can't, but unless I'm missing something, the Kindle app CAN. I can adjust the screen brightness in the app just like I can in iBooks, and that adjustment only affects the Kindle app.
So either Amazon has located the private API and is using it, or there is a mistake in the original complaint, right?

Rene Ritchie says:

@Ian My guess is that Amazon has to use a different way to adjust screen brightness, like changing the color drawn on screen from white to gray, while iBooks can directly control the screen itself (white stays white but the panel pushes less light out)

Who Dat says:

I mean come on, it's just a brightness control what the heck is the big Deal here?

Ian says:

Ah... I see. Makes sense then, I suppose. I'm still not sold that this is the end of the world though. Maybe if Apple made a habit out of this instead of this happening once (as far as I know). Besides, as someone else pointed out, this might just be a temporary issue pending the release of OS 4. I guess time will tell.

mullrat says:

Screen birightness may be a small issue but let's say the kindle app somehow activates the text to speech thing they have on their kindle devices. Apple can very easily not allow this as this may be the domain of the iBooks private API. Or load times or the opportunity to multitask. It's like if your dad owned Disney world. You're gonna get to ride the rides before anyone else.
It's just a culture difference. Windows is very much about freedom and chaos. Mac is about control and stability. Both have positives and negatives.

macharborguy says:

I personally think Apple may make this a Public API in the near future. Gotta test it out and make sure everyone knows how it should work. I wouldn't want apps to arbitrarily adjust the brightness of the screen just because they can.
The iBooks app can not only change brightness, but it can also drop the brightness LOWER than the iPad Settings menu can. A brightness that low is bad for general usage, but good for reading in a dark room, which is why the brightness returns to the normal setting when you exit from iBooks.
Would you want to go into an App, have it change the brightness without your approval or express control, and then when you exit it doesn't set the brightness back to what it was?

Eric says:

It all depends how how Apple handles it in the long run. If they do release those APIs soon, no harm done, and Apple was the guinea pig.
Imagine if you will Apple saying something was going to be the case, and then changing their minds and hurting another company. Couldn't happen?
Remember Adobe and the 64 bit Carbon framework? Adobe handled it very well in consideration of the facts. They just put their noses to the grindstone and rewrote Photoshop and their other apps in Cocoa. We didn't get a 64 bit CS4, but next Monday we get to see the result. Now Carbon Cocoa are not Public/Private by any means. But the fact that Apple quickly pulled 64 bit carbon is illustrative of what could happen if they had APIs that others were using and then suddenly kicked them out the door.
There's two sides to every story. And that was just one example.

(Copy of) Dev says:

@Lady Kaede
I do not believe iBooks is going to become a built-in app; I had thought Apple was purposely keeping it separate so they could update it without having to push wholesale firmware updates. I could be wrong.
Regardless, to play devil's advocate, that does not make the issue go away, it just alters the grounds. To play the Microsoft card again, another part of the antitrust MS antitrust complaint involved the integration of a standalone product (IE) with the underlying operating system in such a way to crowd out formerly even competition (Netscape). While the US DOJ did not come down heavily on that aspect of the case, the EU certainly did.
Again, I do not think Apple is in any legal trouble here yet, because the "iPhone Apps Market" is too small for the DOJ to have a compelling reason to wade in, but Apple certainly seems to be going out of their way to create community/perception trouble for their 3rd party developers. At any rate, the parallels between Microsoft's boorish behavior in the 1990s and Apple's boorish behavior in 2009-2010 is unmistakable, and that does not bode well for the long-term 3rd party market.
@Who Dat
A brightness control is not a big deal -- unless you are trying to compete with an App that can use it, and you cannot. If that feature is important to users, you lose in the market, and, more to the point, *nothing you do * -- no amount of time, energy, or talent, can help you. You are cooked before you begin. Nobody likes to play a game they cannot win, and, after a few such bonks on the head, it is better to pack up find a new market.
No, Amazon is not about to pull out over this. But if developers start to believe Apple will play like this consistently, it will be another thing they weigh against Apple when deciding whether or not to develop for the iPhone OS. The iPhone still kicks ass technically and has a huge install base, but, at some point, behaviors like this will tip the balance of 3rd party developers away from Apple, which will be bad for all of us fans of the iPhone OS.

(Copy of) Dev says:

And it gets Apple has banned an app for using pinch-to-expand.
Not a private API.
Just pinch-to-expand functionality they created themselves in order to make their app more familiar to iPhone OS users.
Apple apparently will not allow 3rd parties to create similar UI conventions, even if the developer does all the work themselves and with public APIs.
I can't wait until Apple makes drag-down-to-spring-reload, and then bans Tweetie.

Selecting Fast Methods Of skin care products says:

Douleur followers generally love to use celeb jackets which celebs put on in the film, new music albums or any event. To make it more comfy, designers normally choose for leather jackets which are built of so that individuals feels it extremely light weighted and feels totally free to use it. As individuals are crazy for their celebs, just because of this it gets a trend and trend to put on celebs outfits. It is noticed that nearly each and every particular person buys it. We have an instance of the album and the movie -thriller- of Michael Jackson. The motion picture was at first built in eighties and the which Michael Jackson wore in the film is still becoming sold and really a lot well-liked among people, and individuals nonetheless enjoys to put on it. It can be one of the ways to express the really like of followers for their favored celebrity.