Jacob Bartlett 🍺's Avatar

Jacob Bartlett 🍺

@jacobstechtavern.com.bsky.social

I write about iOS performance, advanced Swift concurrency, and under-the-hood internals at Jacob’s Tech Tavern. https://blog.jacobstechtavern.com

365 Followers  |  1,104 Following  |  2,052 Posts  |  Joined: 30.08.2023  |  1.5501

Latest posts by jacobstechtavern.com on Bluesky

- AlarmPresentation defines the buttons and text. These can be defined for both an alarm (the original scheduled thing) and a countdown (during the snooze).

Read my full AlarmKit deep-dive here ⏰
blog.jacobstechtavern.com/p/adhd-vs-al...

05.08.2025 19:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It can also contain custom sounds, custom snooze duration, and custom app intents for both the stop and snooze buttons.
- AlarmAttributes handles the visual presentation, including colour, icon metadata, and Presentation.

05.08.2025 19:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

- AlarmManager.shared.schedule is the final AlarmKit call which actually schedules the AlarmConfiguration in the future.
- AlarmConfiguration stores the schedule (when) and the attributes (visual elements).

05.08.2025 19:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Building and running the app, we see the configuration we created in a full-screen interrupt that displays after 3 seconds:

Frankly, the API is a little weird, in that everything kind of nests inside everything else, which is simple but very verbose.

05.08.2025 19:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image Post image

Scheduling your Alarms in AlarmKit

To actually set up the alarm on this schedule, we need to create an AlarmConfiguration object and pass this into the AlarmManager.schedule() method.

05.08.2025 19:01 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Performance Analytics Actionable steps for crowd-sourcing your performance profiles

Next, I’ll demonstrate how you can use this data as a jumping-off point for more elaborate performance diagnostics using Instruments.

Read about my technique here πŸ› οΈ blog.jacobstechtavern.com/p/performanc...

05.08.2025 15:05 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

improve your app:
- Thermal profiling
- CPU and memory usage
- Battery level and status

The technique helps catch hot paths in your code, and quickly flags up inefficient user flows that are killing your users in the wild.

05.08.2025 15:05 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Once you start, you’re the oracle: the first person at your company to know about performance problems, uncovering and fixing user issues before the first bug report comes through.

We’re going to look at various performance metrics you can crowdsource and look at how each one can be used to

05.08.2025 15:05 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Today I’m sharing a technique I created which allows you to crowdsource app performance metrics direct from your users, by piggybacking on your existing analytics system: Performance Analytics.

If you aren’t tracking performance metrics like this, you’re leaving breadcrumbs on the table.

05.08.2025 15:05 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image Post image Post image

Confession time: I never bother adding a license to my GitHub repos because the DX is 10x worse.

If you add a default license, you can’t properly push your existing repo, and it doesn’t give you the handy git instructions.

If my code is open source just go ahead guys, it's there for you.

05.08.2025 11:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Jacob’s Tech Tavern: coming to a lot near you…?

04.08.2025 20:29 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Apple is Killing Swift A great language strangled by governance

Swift was a great language, but it has fallen far from its original vision.

Today, we’re going to learn how modern programming languages are governed. I’ll explain how Swift’s dictatorial structure is uniquely terrible, and demonstrate to you how bad the situation has become.

04.08.2025 19:01 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

TIL you can compel Claude to evaluate more thoroughly via β€œextended thinking mode” that applies extra compute time. With some special keywords.

04.08.2025 16:51 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
High Performance SwiftData Apps My 3000-word apology for killing my iPhone processor

Read the full story here πŸš€
blog.jacobstechtavern.com/p/high-perfo...

04.08.2025 15:05 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

My piece "High Performance Swift Data" is now free to read!

This is a story of performance pain, of data integrity, and of a successful migration. A story of SwiftData gone wrong. Follow along as I convert my SwiftData app MVP from a slow, crashing mess to a lightning-fast, responsive product.

04.08.2025 15:05 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
The 1-hour Swift Concurrency course Understand the toolset from async/await to modern Swift 6.2

so big tech can finally go all-in on Swift (we can dream).

Take my new Swift Concurrency course here πŸ§΅πŸš€
blog.jacobstechtavern.com/p/swift-conc...

04.08.2025 11:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

actors:

Distributed actors can be applied to situations that require safe data isolation between processes. Peer-to-peer gaming is a great first use case, but I’m waiting for someone to re-invent a distributed ACID database by applying distributed actors,

04.08.2025 11:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

processes.

Swift developers can use distributed actors from the standard library, or import the swift-distributed-actors package to apply distributed actors on the server.

Apple created an open-source sample project, TikTakFish, which runs a simple multiplayer game that works using distributed

04.08.2025 11:00 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

applications running across multiple machines a cloud ecosystem.

Distributed actors apply standard actor behaviour, serialised access and data isolation, and extend this to work across processes boundaries. They simplify networking, serialisation, and transport for workloads that apply across

04.08.2025 11:00 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image

Distributed Actors were Chris Lattner’s final gift to mankind: he included a high-level design for distributed actors in the 2017 Swift Concurrency manifesto.

The vision laid out a distributed compute abstraction which enforced safe data isolation across machines. This could support Swift

04.08.2025 11:00 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

I always thought the application-installing UX was super weird whenever you have hidden files displaying

04.08.2025 08:51 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Can’t wait to download and play this when I get home from work! 🀩 #switch2

04.08.2025 06:01 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Hot take: as nice as SwiftUI is to use, it’s a bit, dare I say, lame, how the state of the art every WWDC has changed from β€œlook at these advanced features” to β€œwe ported web views after 6 years”

03.08.2025 19:00 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
How to Learn the Swift Source Code Become an expert at Swift Internals πŸ› οΈ

The argument itself is a HeapObject. We should briefly cover this before continuing, since it’s arguably the most important entity in the runtime code.

Read my full tutorial here to become an expert at Swift Internals πŸ› οΈ blog.jacobstechtavern.com/p/swift-sour...

03.08.2025 15:00 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

swift/include/swift/Runtime/Casting.h, which defines the public API for runtime type-casting operations.

SWIFT_RUNTIME_EXPORT denotes it as a function exported to the runtime ABI. swift_getObjectType returns Metadata, the isa pointer that contains the type information of the argument at runtime.

03.08.2025 15:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

memory addresses of the compiled runtime binary to its public functions. We can see the full runtime contract in Runtime.mdβ€Š:

swift_getObjectType lives at the memory address 0x00022fb0. Let’s find the declaration in the swift runtime library. We find the header file at

03.08.2025 15:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

with the compiler, which inlines instructions that call into the ABI.
swift_getMetatypeMetadata corresponds to a function in the linked runtime library.

The Swift Runtime ABI, or Application Binary Interface, is the API contract, or protocol definition, for the Swift Runtime. This maps the

03.08.2025 15:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image Post image

The Swift Runtime is a C++ library that runs alongside all Swift programs. It’s dynamically linked to your app binary at launch and facilitates core language features such as creating heap objects and managing type data.

We’ve already seen how the runtime β€œruns alongside” code by coordinating

03.08.2025 15:00 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Video thumbnail

Advanced iOS onboarding UX: Picture in Picture

Need your users to access a strictly locked-down permission like always-on location, frequency-update live activities, or keyboard access? Use Picture in Picture alongside a settings link to guide your users step by step!

03.08.2025 11:00 β€” πŸ‘ 6    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

I have not yet summoned the courage to write about Swift concurrency internals

But for everything else, there's my course! blog.jacobstechtavern.com/p/swift-conc...

02.08.2025 19:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@jacobstechtavern.com is following 20 prominent accounts