Apple, Your Developer Documentation is⦠Missing
If you want developers to love your platform, then you need to take this seriously. If it isnât documented, it isnât done.
Assumed Audience: practitioners or interested lookers-on for software developmentâand Apple itself.
Edit: some folks rightly pointed out that my use of âgarbageâ suggests that the problem is the quality of the existing documentation; Iâve retitled the post to capture that the problem is the massive absence of documentation. You can see the original title by way of the slug.
Over the past few months, I have been trying to get up to speed on the Apple developer ecosystem, as part of working on my rewrite project. This means I have been learning Swift (again), SwiftUI, and (barely) the iOS and macOS APIs.
It has been terrible. The number of parts of this ecosystem which are entirely undocumented is frankly shocking to me.
Some context: I have spent the last five years working very actively in the JavaScript front-end application development world, working in first AngularJS and then Ember.js. Emberâs docs once had a reputation of being pretty bad, but in the ~4 years Iâve been working with it, theyâve gone from decent to really good. On the other hand, when I was working in AngularJS 5 years ago, I often threw up my hands in quiet despair at the utter lack of explanation (or, occasionally, the inane explanations) of core concepts. I thought that would have to be the absolute worst a massive tech company (in that case, Google) providing public APIs could possibly do.
I was wrong. The current state of Appleâs software documentation is the worst Iâve ever seen for any framework anywhere.
Swift itself is relatively well covered (courtesy of the well-written and well-maintained book). But thatâs where the good news ends.1 Most of SwiftUI is entirely undocumentedânot even a single line explanation of what a given type or modifier does. Swift Package Manager has okay docs, but finding out the limits of what it can or canât do from the official docs is difficult to impossible; I got my ground truth from Stack Overflow questions. Iâve repeatedly been reduced to searching through WWDC video transcripts to figure out where someone says something relevant to whatever Iâm working on.2
This is, frankly, unacceptable. In the Ember ecosystem, we have a simple rule that code doesnât get to ship unless itâs documented. The same goes in Rust (I should know: I wrote the RFC that made that official policy). Now, I understand that Appleâs API developers (often) work in a different context than these open source projectsâespecially in that they face crunches around releases which are tied to hardware products shipping.
But. At the end of the day, when youâre vending an API, it isnât done until itâs documented. Full stop.
Given what I know of Appleâs approach to this, the problem is not individual engineers (who are not responsible for writing docs) or even the members of dedicated documentation teams (who are responsible for writing docs). But that does not make it any less a failure of Appleâs engineering organization. The job of an API engineering organization is to support those who will consume that API. I donât doubt that many of Apples API engineers would love for all of these things to be documented. I likewise do not doubt that the documentation team is understaffed for the work they have to do. (If Iâm wrong, if I should doubt that, because Appleâs engineering culture doesnât value this, then thatâs even worse an indictment of the engineering culture.) This kind of thing has to change at the level of the entire engineering organization.
Apple claims to be interested in building a platform that is accessible to everyoneâfrom a brand new developer to the most experienced gray-haired folks whoâve been around since the NeXT days. Right now, theyâre not even close. I have a decade of software development under my belt, a fair bit of it in languages with rich type systems and functional programming idioms, and some of this stuff is hard for me to figure out. I canât imagine how mind-bogglingly terrible the experience would be for someone just starting in software, or coming over with experience only in languages like Ruby or Python or JavaScript. It would be completely impossible to learn.
Apple, if you want developers to love your platformâand you should, because good developers are your lifebloodâand if you donât want them to flee for other platformsâand you should be worried about that, because the web is everywhere and Microsoft is coming for youâthen you need to take this seriously. Adopt the mentality that has served other frameworks and languages so well: If it isnât documented, it isnât done.
I am not the only one who has noticed this. No Overview Available summarizes the extent of documentation in Appleâs APIs and⦠itâs not a good look. Hat tip to Lobste.rs user wink and my friend Jeremy Sherman, who both noted this.â©ï¸
Credit where credit is due: it is genuinely excellent from an accessibility and general usability standpoint that Apple has these transcripts. However, theyâre not a substitute for documentation!â©ï¸