◉RORK LABJP
●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first
Articles/Dev Tools
⬡ Dev Tools/2026-07-06Advanced

Migrating Rork Max SwiftUI to @Observable: Narrowing the Re-renders ObservableObject Was Spreading

Rork Max tends to generate SwiftUI apps built on ObservableObject and @Published, where a single state change re-evaluates every subscribing view. Moving to the Observation framework's @Observable narrows invalidation to the property level. Here is the migration path, plus the view-body execution counts I measured in Instruments before and after.

Rork Max235SwiftUI66ObservationPerformance25iOS115Refactoring5

✦ Premium Article

This article started with a faint hitch. I was scrubbing a SwiftUI list screen generated by Rork Max on a real device, and every time I lifted my finger at the end of a scroll, there was a half-beat of lag. Not a dropped frame — just a small delay I could feel but not name.

Attaching the Instruments SwiftUI template made it obvious. Tapping a single cell to toggle its favorite state re-evaluated the body of every card on screen at once. The cause was the shape of the ViewModel Rork Max had produced: the familiar pattern of an ObservableObject with a stack of @Published properties.

This article walks through moving that ViewModel to the Observation framework's @Observable, so invalidation narrows down to individual properties. I migrated a real project as an indie developer, and I want to leave a working log of what swaps cleanly and what breaks quietly.

Why ObservableObject widens re-renders

The mechanism behind ObservableObject is simple. When any @Published property changes, the object fires its objectWillChange publisher exactly once. A view that subscribes to that object through @ObservedObject or @StateObject cannot tell which property changed. It only receives the fact that "something changed," and it invalidates its own body.

So typing one character into a list filter marks every card sharing that ViewModel for re-evaluation. SwiftUI still diffs the result and minimizes the actual draw, but the body closures do run. If those closures build formatters or do heavy layout work, the cost stacks up once per invalidation.

Code generation like Rork Max tends to centralize state into a single ViewModel. Centralization reads well, but it amplifies the exact weakness of ObservableObject: the coarse granularity of objectWillChange.

What @Observable actually changes is tracking granularity

The Observation framework's @Observable macro changes that granularity at the root. When a view's body runs, only the properties it actually reads are recorded as that view's dependencies. If a card reads only wallpaper.isFavorite, it re-evaluates only when isFavorite changes. Change the filter string, and cards that never read that string stay untouched.

In other words, ObservableObject invalidates per object, while @Observable invalidates per property read. That difference matters precisely in screens like a list, where many views share one object.

Observation requires iOS 17 or later. Most apps Rork Max generates target recent iOS, so the prerequisite is usually met — just confirm your deployment target before you start.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Why ObservableObject widens re-renders and how @Observable narrows them to the property level, shown as before/after code
✦View body execution counts measured in the Instruments SwiftUI template before and after migration (from ~3.6x baseline down to ~1.0x on a scrolling list)
✦The five places that break quietly during migration — @Bindable, optional @Environment, didSet — and how to route around each
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-07-18
The Generated Screen That Quietly Jams at AX5 and in German — Putting Layout Resilience Checks on Rork Max SwiftUI
A record of running every Rork Max generated SwiftUI screen through pseudolocalization and the largest text size to find exactly where it jams. Covers when to reach for ViewThatFits, ScaledMetric and layoutPriority, plus the snapshot checks that catch regressions every time you regenerate.
⬡ Dev Tools2026-05-17
Testing Rork Max SwiftUI Features on a Real Wallpaper App — What Worked, What Needed Fixes
I benchmarked Rork Max's SwiftUI generation against the production code of a wallpaper app I actually run. Here is what shipped as-is, what needed fixing, and what I ended up writing by hand — with working code and on-device measurements.
⬡ Dev Tools2026-05-16
Migrating Firebase CocoaPods to SPM in Rork Max Apps
Firebase Apple SDK's CocoaPods distribution ends in October 2026. Here's a detailed migration log from moving 4 Rork Max iOS apps to Swift Package Manager — including dSYM failures, module errors, and the Dropbox conflict copy problem you'll definitely hit.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links