Post

Comparing AI Models: How Bad OpenAIs O3-mini-high is for iOS development

Learn how OpenAI's O3-mini-high model performs for iOS development and compare it with other AI models.

Comparing AI Models: How Bad OpenAIs O3-mini-high is for iOS development

As iOS development continues to evolve at a rapid pace, developers increasingly turn to AI models for assistance. Today, I want to share my experience testing different AI models for iOS development, specifically focusing on their ability to work with modern frameworks like SwiftUI and The Composable Architecture (TCA).

Understanding the Knowledge Gap

When evaluating AI models, the first crucial step is understanding their knowledge cutoff date. This becomes particularly important in iOS development, where frameworks and best practices evolve rapidly.

Let’s explore how different models performed when asked to create a drink tracking application using TCA version 1.17.x.

OpenAI’s O3-mini-high: The Legacy Approach

When testing O3-mini-high, the model revealed its knowledge cutoff date was September 2021. This immediately presented challenges, as it predates significant changes in the iOS development ecosystem. Here’s the code it generated:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import SwiftUI
import ComposableArchitecture

struct DrinkEntry: Equatable, Identifiable {
    let id: UUID
    let time: Date
}

struct DailyDrinkState: Equatable {
    var drinks: [DrinkEntry] = []
}

enum DailyDrinkAction: Equatable {
    case addDrink
    case removeDrink(IndexSet)
    case reset
}

struct DailyDrinkEnvironment {
    var date: () -> Date
}

let dailyDrinkReducer = Reducer<DailyDrinkState, DailyDrinkAction, DailyDrinkEnvironment> { state, action, environment in
    switch action {
    case .addDrink:
        let newDrink = DrinkEntry(id: UUID(), time: environment.date())
        state.drinks.append(newDrink)
        return .none
    // ... rest of implementation
    }
}

Let’s analyze why this implementation is problematic:

  1. The code uses the deprecated Reducer type with an environment pattern, which is even older than TCA 1.0.0!
  2. The state management is overly simplified, missing modern features like IdentifiedArrayOf
  3. The environment pattern shown here is outdated and doesn’t leverage the new dependency management system
  4. There’s no separation of concerns or proper feature composition

O1 Model: A Similar Story

The O1 model produced similar outdated code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
struct DrinkTrackerState: Equatable {
    var drinks: [Drink] = []
    var newDrinkName: String = ""
    var newDrinkAmount: String = ""

    var totalAmount: Double {
        drinks.reduce(0) { $0 + $1.amount }
    }
}

let drinkTrackerReducer = Reducer<DrinkTrackerState, DrinkTrackerAction, DrinkTrackerEnvironment> {
    state, action, environment in
    // ... implementation
}

The issues here mirror those of O3 mini high:

  1. Still using the old reducer pattern
  2. No use of modern TCA features for state management
  3. Missing crucial features like persistence and proper dependency injection

Claude Sonnet 3.5: A Modern Implementation

In contrast, let’s look at the more current implementation from Claude Sonnet 3.5:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@Reducer
struct DrinkTracker {
    struct State: Equatable {
        var drinks: IdentifiedArrayOf<Drink> = []
        var selectedType: DrinkType = .water
        var amount: Int = 250
        var isAddingDrink: Bool = false
        var dailyGoal: Int = 2000

        var totalConsumption: Int {
            drinks.reduce(0) { $0 + $1.amount }
        }
    }

    @Dependency(\.persist) var persist

    var body: some Reducer<State, Action> {
        Reduce { state, action in
            // Modern implementation with proper architecture
        }
    }
}

This implementation showcases modern TCA features:

  1. Uses the @Reducer macro for cleaner syntax
  2. Implements proper dependency management with @Dependency
  3. Uses IdentifiedArrayOf for efficient state management
  4. Includes proper persistence handling
  5. Provides type-safe enums for drink types with emoji support

DeepSeek’s R1: Advanced Feature Composition

The R1 model showed an even more sophisticated understanding of modern TCA:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
@Reducer
struct DrinksFeature {
    struct State: Equatable {
        var drinks: IdentifiedArrayOf<Drink> = []
        @PresentationState var addDrink: AddDrinkFeature.State?
    }

    var body: some ReducerOf<Self> {
        Reduce { state, action in
            // Implementation
        }
        .ifLet(\.$addDrink, action: \.addDrink) {
            AddDrinkFeature()
        }
    }
}

This implementation demonstrates:

  1. Proper feature composition with child reducers
  2. Usage of @PresentationState for managing view presentation
  3. Modern TCA patterns for handling optional child state
  4. Clean separation of concerns between main and add drink features

Understanding How Outdated AI Tools Affect iOS Development

Choosing the right AI tools for iOS development matters more than you might think. Here’s why outdated models can hurt your workflow and app quality:


Key Risks of Using Outdated AI Models

Technical Pitfalls

  • Old code patterns that you’ll need to rewrite later
  • Missed opportunities to use modern features that boost app speed
  • Messy dependency management (like broken libraries or tools)
  • Security gaps from outdated coding practices

Workflow Challenges

  • Struggles to connect with newer tools and libraries
  • Slower teamwork and harder code reviews
  • Apps that become harder to maintain over time
  • Wasted time fixing avoidable issues

Smart Practices for AI-Assisted Development

Verify the AI’s Knowledge

  • Check when the AI was last updated.
  • Test if it understands your specific tools (e.g., SwiftUI, TCA).
  • Cross-check its code with Apple’s latest docs.

Review and Adapt

  • Treat AI-generated code like a junior developer’s work: review it closely.
  • Stay alert for framework updates—ensure your AI knows about them.

Why Staying Updated Matters

iOS tools evolve fast. Modern frameworks like SwiftUI and TCA work best when your AI assistant understands today’s best practices. For example:

  • Outdated AI might use old code patterns that break current features.
  • Up-to-date AI helps you build cleaner, safer, and more efficient apps.

The Bottom Line

Not all AI tools are equal. Models trained on pre-2022 data often lack critical knowledge of modern iOS development, while newer models align with current standards.

Ask yourself:

  • Does your AI tool “get” the latest SwiftUI and the dependencies that you use in your app?

Choosing an AI assistant with recent training isn’t just convenient—it’s essential for building apps that last.

Stay updated. Build smarter.

☕ Support My Work

If you found this post helpful and want to support more content like this, you can buy me a coffee!

Your support helps me continue creating useful articles and tips for fellow developers. Thank you! 🙏

This post is licensed under CC BY 4.0 by the author.