Catalytic Converter

Catalyst is in some ways a miraculous technology – just click a check box and instantly have a working Mac version of your app. And, given the source code of a relatively modern iOS app, it certainly works. Even PCalc’s About screen worked out of the box.

“Your developers were so preoccupied with whether or not they could that they didn’t stop to think if they should.”

But that is just step one of a much longer process.

I wanted to explore how feasible it would be to move PCalc to Catalyst, but my criteria was that I would only release something that was better than the existing Mac version. It would be great if I could. Even though a lot of core logic code is shared between the different versions, most of the user interface code isn’t, so I currently have to write that twice which means less time spent on both versions.

For a developer without an existing Mac app, that equation is certainly a different one.

The “single check box” Catalyst version of PCalc is a single resizable window, with many tables and popovers that seem to me to be out-of-place on the Mac.

It does all work though!

Things that work well with touch, don’t necessarily look or feel great. In fact, I would say that the more an app uses the standard iOS user interface elements, the less it feels right on the Mac.

For something like a game that is all custom UI anyway, you probably couldn’t even tell, although Catalyst currently isn’t a great fit for game developers either.

It became pretty clear to me that I would need to rewrite a lot of the user interface, to find a happy middle ground between the iPad and the Mac. Which would probably benefit both in the long run, to be fair. But with everything else that was going on this summer, I couldn’t justify that work, with no guarantees at the end of the day that I would have something I was happy to ship. So, I mainly focused my time on things like Shortcuts and Dark Mode, and iOS 13 support in general.

I decided I would commit to a Catalyst version of my “Dice by PCalc” app. It’s a smaller app, and not so high stakes, but it still touches a lot of the OS. That would give me a feel for how well Catalyst works today.

Time to roll the dice…

And I have something that is functional, that I shipped on day one. I’m still not 100% happy with it yet though.

Once you get past that first check box, and want to build out Mac-specific features like menus, the APIs start to feel rougher and unfinished. For example, the ability to put images in menus only started working late in the Catalina beta cycle, and the menu APIs are not nearly as comprehensive as the underlying Mac equivalents.

SceneKit fails entirely on older machines with Nvidia GPUs, leading to black windows, a bug that made it all the way to Catalina GM. Multiple window support works, but I ran into a lot of problems there too. Some APIs like the share sheet are just not present.

There’s still no direct way to read the state of the keyboard either, so detecting that the user is holding down option as you drag something isn’t easy. That also affects games that want to offer keyboard controls. I found a way through public APIs, and App Review did approve the app using this technique, but it isn’t ideal by any means. Similarly for really simple things like changing the cursor.

Some user interface elements like the spinning carousel pickers felt especially out-of-place, and unintuitive – you can’t click and drag on them to change the value, you have to use a scroll wheel/gesture.

Before polishing

The nearest equivalent on the Mac would be something like a popup menu button. But there’s no popup menu button on iOS, so I have resorted to writing my own – and that is one of the classic blunders.

After polishing

It’s the kind of thing that Apple should supply as standard, but I get the feeling they just ran out of time. The OS releases don’t seem to have gone very smoothly in general, from my outside perspective.

Documentation for Catalyst has been almost non-existent too, which has made things a lot harder than they should be.

From the business side, there is also no way for somebody to get the Catalyst version of the app for free when they buy the iOS version. And no great way to share in-app purchases either if you have a free app. That generally means that somebody will have to pay a second time to get a copy. There is definitely an argument that building a Catalyst version is actual work, work that should be paid for, but I can equally see the side of consumers that have been told it’s just a simple check box. Apple said a shared store will come in two years, but that’s still a way off.

I am hopeful that this is just a 1.0 (if you count the Mojave apps as a public beta), and things will continue to improve. It’s a great foundation, but there’s still a way to go before I could use it for PCalc. The real question is, what will be the state of Catalyst vs the state of Swift UI in future years? If one gains significant traction with developers, will Apple stop investing resources in the other? Time will tell.

For now, buy my Dice app 🙂

Author: James Thomson

Indie iOS / Mac developer, maker of PCalc and DragThing. Occasional writer, conference speaker, and podcast pundit.