Sign in

Bruno Rocha
Person on desktop writing code
Photo by Lee Campbell on Unsplash

I gave a talk about scalable iOS apps at SwiftHeroes 2021 in which I speak about an app’s four “levels” of complexity, ending by stating that we still don’t know what the “fifth level” would be.

I do have one guess though: I believe a “level five” iOS app will…


Violin strings
Photo by Belen Garrido on Unsplash

StaticString is an interesting type in Swift. It's essentially nothing more than a String that can't be modified for the purposes of referencing static content inside your binary.

You can encounter StaticString in Swift when referencing source metadata like #file and #function, but you can also define one yourself by…


A smartphone
Photo by David Grandmougin on Unsplash

I’ve been playing around with Combine for a while now and had some trouble navigating all the new protocols and types, especially when it came to extensions. In this article, I’ll show you how to properly extend existing publishers and how to wrap them when creating your own custom publishers.

The Easy Case: Extending Basic Output Publishers


Riding a BMX bike
Photo by Kvnga on Unsplash.

When it comes to benchmarking the speed of code, it’s common for people to boot a playground, throw in a Date object, and calculate the time difference after a piece of code runs. That may give you a rough estimate, but it can also be very misleading. …


Clapperboard
Photo by Jon Tyson on Unsplash.

Actors are a feature that is part of Swift’s Structured Concurrency, which brings a brand new format to write and deal with asynchronous code. Although what Swift brings is new to the language, it’s not new to tech itself. Many languages supported actors and async/await before Swift, but one interesting…


Taking a picture on phone
Photo by Suganth on Unsplash.

RealityKit Object Capture is a feature introduced in Xcode 13 that allows you to create 3D objects from photographs using a process called photogrammetry. …


I’ve been meaning to write an article about computer science fundamentals and how it can improve a programmer’s career for a long time, but I always had trouble finding a good way of introducing this topic. The reason I’d like to talk about this is first that, well, I really…


Skyscrapers
Photo by Drew Graham on Unsplash.

Concurrency is the entry point for the most complicated and bizarre bugs a programmer will ever experience. …


License plate on a car
Photo by Thomas Millot on Unsplash.

The easiest way to create a paid macOS app is to simply put a price tag in the App Store, but it’s a common practice nowadays to provide a free download that can later be upgraded to a pro version. …


Bridge in the city
Photo by Will H McMahan on Unsplash.

Bridging to/from Objective-C is an important part of Swift development due to the Obj-C history of Apple’s platforms. Unfortunately, there are some hidden caveats that could lead to bizarre situations that would be impossible in a pure Swift environment. …

Bruno Rocha

iOS Developer at Spotify | Writer of https://swiftrocks.com | Twitter: @rockbruno_

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store