Back to walidsassi.com
iOS · Swift · AI

Engineering-grade iOS, from architecture to AI.

SwiftTribune is a technical platform for iOS engineers who take software craft seriously. In-depth articles, tips, and podcast conversations on the decisions that make apps scalable, testable, and built to last, from Swift 6 Concurrency to on-device AI.
Swift 6 Concurrency Clean Architecture On-device AI SwiftUI iOS at Scale
iOS Swift Tips AI Dev Podcast
New Book · Packt Publishing

AI-Driven Swift
Architecture

Master scalable iOS architecture in the AI era

Running large language models locally on Apple Silicon

Local LLMs on Apple Silicon, Part 1: From Compatibility to Your First Local Chat

Cloud APIs put a frontier model behind a single HTTPS call. That convenience is hard to beat, and for most production workloads it remains the right choice. But something has shifted over the last couple of years: the gap between “what a hosted model can do” and “what a model running on your laptop can do” has narrowed enough that local inference is no longer a curiosity. For developers, especially those of us building on Apple Silicon, it has become a serious option. ...

May 21, 2026 · 19 min · Walid Sassi
Claude Agents in Claude Code, the new agent view for multi-agent iOS workflows

Claude Agents: Multi-Agent iOS Workflows in Claude Code

A walkthrough of Anthropic’s new Claude Agents (agent view) inside Claude Code on iOS: how to run a Clean Architecture refactor agent and a unit-testing agent in parallel on isolated Git worktrees, with the full lifecycle and synchronisation pitfalls.

May 13, 2026 · 12 min · Walid Sassi
MLX Embedders, Text Embeddings on Apple Silicon with Swift

MLX Embedders in Swift: On-Device Text Embeddings for iOS

In Part 1 of this series, we built a minimal LLM inference pipeline on Apple Silicon using MLX Swift. In Part 2, we quantized a model from scratch and saw how 4-bit precision makes billion-parameter models tractable on a phone. This article introduces MLX Embedders, specifically the MLXEmbedders Swift library, and takes a different angle. Instead of generating text, we are going to encode meaning. A user types: “best hikes near a volcano.” A keyword search returns nothing useful. An embedding-based system returns exactly what they need, because it understands what the words mean, not just what they spell. That capability is what embeddings unlock, and it is the foundation of every serious AI feature in production today: semantic search, recommendation systems, RAG pipelines, and clustering. ...

April 24, 2026 · 19 min · Walid Sassi
Quantization in LLMs for mobile developers

Quantization in LLMs: How to Run AI on Your iPhone Without Burning It

In Part 1 of this series, we set up the MLX ecosystem and ran a language model locally on Apple Silicon. If you haven’t read it yet, it’s worth starting there. This article tackles the question that naturally follows: how do you fit a multi-billion parameter model into a device with 8 GB of RAM? The answer is quantization, and understanding it will change how you think about on-device AI. Introduction: LLMs Are Just Very Large Matrices Before we can explain quantization, we need to be clear about what we’re actually compressing. ...

April 6, 2026 · 10 min · Walid Sassi
MLX Swift, On-Device Large Language Models on Apple Silicon

MLX Swift: Enabling On-Device Large Language Models on Apple Silicon

Abstract The proliferation of large-scale neural language models has, until recently, been contingent upon access to remote computational infrastructure. The architectural characteristics of Apple Silicon, most notably its unified memory subsystem, present a substantive departure from this dependency. This article examines MLX Swift, a native Swift binding to Apple’s MLX machine learning framework, as a mechanism for deploying quantized Large Language Models (LLMs) directly on consumer Apple hardware. We characterize the layered architecture of the MLX ecosystem, contrast its design philosophy with that of Apple’s Foundation Models API, and present a reference implementation demonstrating the complete inference lifecycle: model acquisition, session initialization, and autoregressive text generation. The discussion is grounded in the computational properties of unified memory and their implications for on-device inference efficiency. ...

March 31, 2026 · 13 min · Walid Sassi

Getting Started with Claude Code for Xcode 26: Setup, Pricing & Monitoring Guide

The landscape of iOS development has dramatically shifted in 2025. With Apple’s introduction of Xcode 26 at WWDC 2025, which integrates ChatGPT and supports multiple AI models through API keys, and Anthropic’s release of Claude Code as a powerful command-line tool for agentic coding, developers now have unprecedented AI-powered development capabilities. ...

September 2, 2025 · 6 min · Walid Sassi

Understanding Swift's isolated Keyword: Parameters and Closures

Swift’s concurrency model introduces actors to provide safe, isolated access to mutable state. However, constantly using await when interacting with actors can create performance bottlenecks and reduce code readability. The isolated keyword offers an elegant solution by allowing synchronous access to actor state in specific contexts. ...

August 18, 2025 · 2 min · Walid Sassi

Integrating Claude API with Xcode 26 Beta 5: A Complete Guide

With the release of Xcode 26, developers now have exciting new possibilities for integrating AI capabilities directly into their development workflow. In this article, I’ll walk you through my experience integrating Claude’s API with Xcode 26 Beta 5, including the cost considerations and token system that you should be aware of. Getting Started: API Key Setup Step 1: Creating Your API Key The first step is to obtain your API key from the Anthropic Console: ...

August 14, 2025 · 2 min · Walid Sassi

Swift Actor Common Pitfall: Parameters Are NOT Protected!

class DownloadCounter { var count = 0 var lastDownload: Date? } actor DownloadManager { private var totalProcessed = 0 // ✅ Protected by actor func processDownload(_ counter: DownloadCounter) async { totalProcessed += 1 // ✅ Safe - actor's state // 💥 DANGER: counter is NOT protected! counter.count += 1 // ❌ Potential data race counter.lastDownload = Date() // ❌ Potential data race } } // Data race scenario func dangerousUsage() async { let counter = DownloadCounter() let manager = DownloadManager() // Thread 1 Task { await manager.processDownload(counter) } // Thread 2 - Concurrent access! Task { counter.count += 5 // 💥 DATA RACE with Thread 1 } } ✅ The Solution: sending to Transfer Ownership ...

August 11, 2025 · 1 min · Walid Sassi

Building Interactive Timelines in SwiftUI: From Static Views to Draggable Events

Ever wondered how to build intercative that feel natural and responsive? The kind where users can drag events and see real-timeupdates? SwiftUI’s combination of GeometryReader, alignementGuide, and gesture handling makes this suprisingly elegant. Let’s build from scratch and the understand the magic behind positioning elements on a timeline. The Challenge: Positioning Events in Time magine you need to visualize events that occur over time, think of a video timeline, project milestones, or async operations. The core challenge is: How do you position an element at a specific time on a timeline of unknown width? ...

August 3, 2025 · 6 min · Walid Sassi