DEV Community

Angelo Stavrow for Write.as

Posted on • Edited on • Originally published at write.as

WriteFreely SwiftUI Client

Hot on the heels of the developer-preview release of the WriteFreely Swift package, I'm happy to announce that work has started on a new (but related) project: a WriteFreely multiplatform SwiftUI client app.

A multiwhatsit who now?

Right. Let's clear up the jargon, first.

Apple announced SwiftUI at their World Wide Developer Conference (WWDC) last year. Initially, SwiftUI let you build user interfaces across all Apple platforms —iPhone, iPad, Mac, Watch, and Apple TV— with a single, declarative framework, ostensibly replacing the need for using AppKit (on the Mac) and UIKit (on iOS) in building your apps.

This year, Apple took SwiftUI further: you can now build entire apps in SwiftUI. And while you can still build a platform-specific app (e.g., just for the Mac, or just for Apple TV), a new template named multiplatform further coalesces developing for the Apple ecosystem.

A multiplatform app project in Xcode contains a Shared folder, in which the bulk of your app's code lives. There are also iOS and macOS folders for platform-specific customizations, but the idea is that you can use SwiftUI components to build an app that will run natively on iPhone, iPad, and Mac with almost no such customization necessary.

That's pretty cool.

So, what exactly is being built?

This is a WriteFreely client app. You'll be able to log in to your WriteFreely instance, write new drafts, publish them to a collection, and edit them, thanks to the WriteFreely Swift package. And it'll be available for iPhone, iPad, and Mac, thanks to SwiftUI.

Just like the Swift package, it'll be built in the open — the repository is on GitHub, and if you're interested in helping, check out the CONTRIBUTING doc. Developers of all experience levels are welcome to join — just let me know in this forum topic!

The goal is to go from a new SwiftUI project to a complete working app in time for the release of iOS 14 and macOS 11. The launch usually happens in September, so we want to have the app done by the end of August. That's a tight deadline, so we're limiting the scope initially to handle the key actions WriteFreely users would want: creating drafts, publishing them to their WriteFreely instance (either as a draft, or to a collection), and updating those posts.

As we build the client app, we'll be updating the Swift package as necessary. As far as I know, this will be the first WriteFreely client to consume the package, so I expect that we'll find a few surprises that trip us up as we go along. While I tried to build it as robustly as possible, that's the nature of packages that wrap an API — you only find out about their shortcomings when you start building projects with them! 😅

I'll be posting here on both the progress of the work, and the learnings that inevitably come from building a new app in a beta IDE, against a beta framework, while running beta operating systems. I've already found one UX deficiency in adding packages to multiplatform apps, and I'm sure there will be more surprises to share.

More TK!

Top comments (0)