We don't guarantee any life expectancy of our apps. But we can tell people we don't use private APIs, and that makes it much more likely that our apps will through many future macOS releases. And that if there are changes, we'll be aware of them in advance, and will hopefully have time to come up with alternatives.
With public APIs, you are informed when changes are coming, and you can work with the changes in the beta releases of macOS. You will never be surprised by the removal or change in functionality in a public API, because Apple has to communicate such changes.
That is not true of private APIs.
As Peter noted, if Apple wants to change or remove a public API, they provide tons of notice. You're notified that at some point in the future, the API will be going away, or will be modified. Then you're notified again. And again. You may not be notified when they actually remove the API, other than you'll see it in the beta's release notes that some API has been removed. But you'll know it's been coming for a long time. This will also generally happen only with major macOS releasesābut again, even if it were to be removed in a minor release, you will have known it's coming.
A private API, on the other hand, could simply vanish with the next minor macOS update, without any sort of notice at all. That's because it's a private API, designed for use only by Apple. It's an API that hasn't been documented anywhere, and you had to discover by digging in Apple's code.
Or it may still exist, yet change in such a way that your app breaks. Nobody wants to ship an app only guaranteed to work with the minor OS version that was out when the app shipped; that could mean it'd break within a month if a minor update came out and modified/removed the private API you rely on.
It's one thing to say your app is guaranteed to work with the major OS version that was out when you shipped it. It's another to say you can only guarantee that it works until the next minor update comes out.
While this may be true for some developers, the more common case is this: You want to do something, but Apple doesn't provide a public API that lets you do that thing. You discover there is a private API that does that thing, and it's the only way you can do it. If the private API goes away, the feature that used it is deadā¦but if you don't use the private API, you can't even write the feature in the first place.
That was the case for us and Resolutionator, an app that makes it easier to change display resolutions. The only way to get the list of available resolutions was via a private API. If that API breaks or vanishes, Resolutionator will no longer work. So on the app's home page, we note:
Why is Resolutionator so inexpensive? In order to do what it does, Resolutionator relies on a non-published programming interface within macOS. Changes to this interface may cause Resolutionator to fail. If that were to happen, we don't want you to feel like you haven't gotten your money's worth from our app. And at only $3, you can do that with a few hours' usage of the application.
As above, often times it's because there's no other way to do it at all.
This hasn't been the case in our experience; we have a few we've been watching for literally years, and they've never gone public. Maybe others have, but I'm not aware of them. A good example is SpacesāApple can do amazing things with Spaces management, but they don't allow developers to do much of anything at all with Spaces. We keep waiting, so we can improve our apps' ability to work with Spaces, but nothing's changed.
As much as I wish this were true, how many Apple employees use an app with a private API is probably irrelevant, mainly because the teams responsible for developing the OS won't know (or care!) how "popular" a private API is. Their focus is on developing the OS, and they will do what they need to do to accomplish their objectives.
And that's the why private APIs even exist: So Apple can do what they need to do to the OS without worrying about the impact it has on developers. Once an API is public, it becomes much harder to make substantive changes, because as noted, those changes must be communicated in advance so developers can plan to change their apps, so things don't break.
None of the above is confirmed fact from Apple, of courseāit's just how I believe things work internally relative to private and public APIs. But it's logical, because it's based on the distinction between public (devs can rely on these and build business plans on them) and private (these are for Apple's use only) APIs.
-rob.