Tuesday, May 1, 2018

More on Apple’s Cross-Platform API Project ↦

A few months ago, Mark Gurman reported that Apple was working on a way to enable developers to write applications that run on both macOS and iOS. I briefly mentioned it on this blog. Now John Gruber at Daring Fireball reports more details:

THE NAME: There is indeed an active cross-platform UI project at Apple for iOS and MacOS. It may have been codenamed “Marzipan” at one point, but if so only in its earliest days. My various little birdies only know of the project under a different name, which hasn’t leaked publicly yet. […]

WHAT IS IT? I don’t have extensive details, but basically it sounds like a declarative control API. The general idea is that rather than writing classic procedural code to, say, make a button, then configure the button, then position the button inside a view, you instead declare the button and its attributes using some other form. HTML is probably the most easily understood example. […]

WHEN: I’m nearly certain this project is not debuting at WWDC 2018 in June, and I doubt that 2018 was on the table in December. It’s a 2019 thing, for MacOS 10.15 and iOS 13.

On June 6, 2009 (bear with me, I promise this is going somewhere), Palm, Inc. launched its answer to Apple’s iPhone: the palm prē. At the heart of the palm prē was Palm’s long-awaited successor to its aging PDA/smartphone operating system Palm OS: webOS. webOS moved Palm’s platform into the then-modern age in many ways but its signature feature—the whole reason it was called webOS—was that its “native” application API used web technologies: HTML, CSS, and JavaScript. Around the same time, Microsoft announced that Windows 8 would enable developers to write applications for that OS using HTML, CSS, and JavaScript as well.

I remember thinking at the time that Palm and Microsoft had gotten the wrong end of the stick. Web-based applications were hitting something of a peak of popularity at the time and those two companies, among others1, wanted to capitalize on it. But I felt (and still do) that developing web applications was (and is) popular in spite of the specific technologies involved—HTML, CSS, and especially JavaScript—not because of them. Web applications are popular for two reasons: (1) they are cross-platform and (2) they enable a declarative style of development2. I thought that what platform providers should be doing was creating a declarative style of application development without using HTML, CSS, and JavaScript and instead using a new, purpose-built declarative syntax for the user interface and existing programming languages for the actual code.

We still don’t have many details on exactly how Apple’s declarative APIs will work but given Apple’s past work, I’d be surprised if it actually used HTML, CSS, and JavaScript. It seems more likely that they will create a new, purpose-built declarative syntax for the user interface and use an existing programming language for the actual code.


  1. Electron represents the open source equivalent of these efforts; it enables developers to write cross-platform desktop applications in HTML, CSS, and JavaScript. It is the core technology enabling applications like Atom and Slack

  2. What these technologies allow developers to do is separate the user interface from the code that runs it. The user interface becomes a matter of declaring, using a relatively simple text-based syntax, that the developer wants a button here or a text label there, etc. Separately, then, the developer defines what should happen when that button gets clicked.