Feb 7, 2024

swift @ mobelux

Day to day I work at the digital agency Mobelux, have been for over 13 years. We got started in the mobile game early and built Tumblrette, which eventually became the official app.

A lot has changed with the company as well with the mobile landscape since then. These days most of our work is web (django) and we are a fully remote and distributed team. As for mobile, we've seen Objective-C go to Swift and CocoaPods go to Swift Package Manager, etc, etc, etc leading to interesting uses for the Swift Programming Language.

Today we lean on Swift as the systems language it is meant to be. Breaking out of the Apple apps box to use in a variety of places to solve problems.

apps

This is a no-brainer. We use Swift to build apps for all of Apple's consumer platforms. We are all in on SwiftUI and any app bigger than a sales prototype is going to use PointFree's Swift Composable Architecture aka TCA. We think this is a magic combination that let's us build scalable, testable apps for all platforms.

web

static sites

There are definitely no shortage of static site generators out there (written in a variety of languages), but leveraging existing Swift talents to build sites ftw. We like Publish by John Sundell. It has a sweet theming system and powerful plugin architecture, which make it very flexible.

We recently ported mobelux.com to Publish from a legacy cms and life is good.

platforms

While we haven't shipped a web platform for client project using Swift, we use Vapor internally for platforms and tooling. Vapor really leveled up when the team adopted async/await for the majority of APIs, leading to it becoming far more approachable.

serverless functions

This is the new kid on the block for us. The Swift Server Working Group maintains an AWS lambda runtime package which facilitates running Swift code in a lambda function.

We use this to bridge the client/server gap to provide functionality without building an entire backend system. Example use cases include webhook consumers and form submission handlers.

Further, we recently published 2 packages intended to make using Swift lambdas just a bit smoother:

tools

We've built a number of CLI tools that make dev life a little easier. For example a tool to scaffold a new TCA feature, ready to go with a reducer, view, and unit tests. Also this handy little tool we call Watcher which we use to quickly rebuild a Publish site during development for quicker iterations.

libraries

Of course we build libraries to support all the other ways we use Swift. Not much else to say about that I suppose.

what's next

Who knows, but there are a ton of interesting projects that are doing amazing things, to name a few...

  • SwiftWasm - SwiftWasm compiles your Swift code to WebAssembly
  • MadMachine - A swift way to interact with the physical world
  • SwiftUIWeb - A toy implementation of SwiftUI for the Web
  • SwiftGodot - Godot bindings for Swift

One thing is for sure, we will continue to look for ways to use Swift to solve problems and ship projects.