Fn Key Function

Resolutionator! :sunglasses:

That’s rather a straw man argument.

That’s unfortunately true, but as @peternlewis wrote above, that tends to be ā€œ(after lots of warning from Apple over a number of years generally).ā€

Of course discussions here (interesting though they may be) won’t change Apple policies, and I’m quite happy that they won’t change those of Stairways Software (KM) either. Or indeed those of Folivora (BTT) etc. :wink: As I say, we can benefit from combining the approaches.

I agree, both approaches are fine and it’s great we have options.

Ultimately as a user I don’t care why an app breaks. I had multiple of my apps break with Sequoia due to a completely unannounced change in an official Apple API that had worked fine for at least 10 years: [macOS Sequoia] Using RegisterEven… | Apple Developer Forums

This stuff can always happen and I do not think any company could/would offer refunds :man_shrugging:

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.

I wish that was true, but after Sequoia I was in contact with three different developers that all told me the macOS changes that broke their app only appeared in one of the last betas before release, there was no documentation and no workaround

This is a recommended read even if only slightly related

The question I would have is whether those changes were to public APIs, or just to how macOS does certain things, and those changes broke their apps. Changes to the OS that can break an app may not involve a public API, but can still be fatal to an app.

As an example, if Apple wrote an entirely new Finder, and the new Finder didn't include column view, that would break any number of apps and AppleScripts and automations that rely on column view. (I have more than a few Keyboard Maestro macros that work with column view windows, as an example.) But the existence of column view in Finder isn't an API, it's simply a macOS feature. This is something that could happen without any advance notice, because it's simply Apple changing a feature.

On the other hand, if Apple changed the FileManger API ("A convenient interface to the contents of the file system, and the primary means of interacting with it.") without notice, that would also break a ton of apps, but it's a change that developers would expect to be notified about, because Apple has said "this is an API you can use in your code to interact with the file system." I can't see Apple making changes there without making developers aware of the upcoming change.

I assume it's possible Apple doesn't communicate all public API changes, but we've not experienced that related to any of the APIs we use.

I've read that before, and it's very interesting. But it's also relevant that—at least to my reading—ACE was developed using methods that didn't solely rely on public APIs. That's my take on this section of the article, anyway:

This was monumental! Even as our products had become essential for hundreds of thousands of Mac users, we’d never been able to trust the ground beneath our feet. Eventually, that ground gave way, and our company faced a threat to its very existence.

I don't think you'd write the paragraph that way if your code relied solely on published APIs to do what it did. That's just my opinion, of course, but if you're relying on public APIs, you can trust the ground beneath your feet, because you're using published methods to do what you do.

Also, as they themselves noted, they had an edge here in that they're the market leaders with a huge installed base and many other large companies have licensed their technology. Even with all that, it took the better part of four years to get the changes they needed. Most other companies, even if their apps are well used within Apple, wouldn't stand a chance.

-rob.

it was all App Store apps, so I assume only public API :man_shrugging: at least I think Apple only allows public API on the App Store

But I agree, of course you can be more certain about stability when using official API - I just don’t believe you can be 100% sure ever.

Yep, but they got an exception to continue using the API during that time

Apologies if I wasn't clear: I'm not saying those apps were using private APIs. I'm saying it's not clear if what changed in the OS was an undocumented change to a public API, or just a feature change that caused the app to stop working. One would be expected to be communicated, the other would probably not be communicated.

Either way, I agree that Apple can be very stingy with communications, and I wish they were more open about things.

-rob.

What counts is that KM does not use private API. The developer has decided this and is allowed to do so. Other developers have decided differently. We can welcome or regret this. But what we can do above all is decide whether we want to use an app or not.

That's interesting and good to know. I have that but don't use it though I have heard so many great things about it. I really like Peter's approach and grateful for that explantation and agree it is so nice to have access to using things that might break to still accomplish what we are after.

I really hope Peter gets an apprentice to help him and carry on the work so that it can continue to live on for years to come when Apple breaks things. Great dicussions here in this thread an informative.

Have a listen to this edition of the Mac Power Users podcast, where they interview Andreas (the developer of BTT). You can practically taste his fear of even a minor OS update...

Thanks, I listened to all of it. (And it's long!) The most relevant part (regarding his fear) is during the 8th minute. And maybe also the 23rd minute.

Thanks for the tip. That seems a bit overinterpreted to me :smirk: I think what you ā€œtasteā€ is mainly a slight tension because of the interview. I imagine he doesn't do this every day.

I assume it's mainly about the trackpad and the magic mouse. That is the origin of the app. As far as I know, otherwise mainly public API are used.

The comment about the Apple engineers is interesting but not surprising. ... Even priests are only human ... ego te absolvo ... because ... it's better for me. :slight_smile:

However, whether it is reasonable to use an app that also relies on a private API is up to the user to decide.