CommentComment

Happy Friday, everyone! Below, I’ve got another longer-form article covering an interesting hardware-based Swift project from Luke Howard and Peer Espen Ursfjord. The device they’re building is music-related, but the real story is about getting Swift, C/C++, Linux, Android, Dart, and Flutter all working together!

Next week’s issue will be my usual "Best of And Finally…" for 2024, and then I’ll take my annual week off the week after. But until then, enjoy hearing about what Luke and Peer have been up to. 🎸

Dave Verwer  

Article

I don’t know if you’ve noticed, but Swift is trying hard to shake the image of being only for Apple platform development. Take a look at some of the posts from the Swift blog over the last year and you’ll spot a theme:

Apple also recently announced swift-java, and it was in response to my writing about it that Luke Howard got in touch to tell me about his project.

He’s building a hardware device for use in recording studios. It uses a mix of technologies but has Swift at its heart. The device monitors and mixes audio tracks that are flying around an Ethernet network as Audio over IP (AoIP). It captures the audio and gives musicians the ability to make their own mix from the individual AoIP feeds and output it to their headphones. For example, a drummer might turn down other channels to focus on their own output while setting the rest of the band to be quieter.

I had a quick call with Luke and Peer Espen Ursfjord, another developer on the project, earlier this week to learn more about it. The hardware is built around a Raspberry Pi CM4 with a small touchscreen. The Swift app runs on Linux and handles the creation of two mixes for two headphone ports on each device. All the back-end logic happens in Swift using some open-source libraries written by Luke and his team. It then uses Flutter for the UI with their FlutterSwift library. The end result is a device you can either control from the embedded touchscreen or from an iPhone, a Mac, or an Android phone!

Luke is a musician and producer by profession but has always kept one foot in the Apple development world ever since he worked on Rhapsody in 1997/98. That mix of backgrounds shows, and is often where you get the most interesting products. Software developers know how to fix problems that software developers have, but bring in some professional experience from outside of the industry and magic can happen.

When you combine that domain knowledge with Swift’s ability to fit in with other technologies you can progress quickly. That said, Luke was keen to say that he’s building on the shoulders of giants like the people behind Open Control Architecture (OCA) and the work of the Swift and Flutter teams:

“One thing I really want to drive home is that this is not rocket science. I’ve not done anything half as clever as the Swift team has with C++ and Java interoperability. FlutterSwift is just a few thousand lines of structured concurrency glue around Flutter platform channels. The beauty is what you can do with it, which is to make your platform-specific Flutter code platform-agnostic.”

That goes back to my point about different perspectives, but also shows how far we have come with interoperability with Swift. I hope you’ll get inspired and check out a few of the links in this article and sign up for their notification list where they are gathering interest.

I’ll finish with my favourite quote from Luke during our conversation:

“Having C, C++, Dart, Java, and Swift in the same process is kind of ridiculous, but somehow it all works.”

I’m really glad we live in a world where not everything is pure Swift.

Are you doing anything interesting with Swift that isn’t an iOS/macOS app? Let me know by replying to this email.

Dave Verwer  

News

Jobs

Senior iOS Developer @ komoot – Develop innovative new features from the first idea and concept over to road map planning, implementation, testing, release and monitoring. Team up with six team members to build a state of the art iOS app with more than 5 million installations. – Remote (within European timezones)

 

And finally...

Has it only been 5 years? It seems like so much longer.

I sometimes wonder how the team who created that machine feel about it. It was a remarkable product, but they must have known what was coming. Or, maybe they didn’t? I’d love to know the story.