← All courses

Training

AI-Infused iOS

AI-Infused iOS

From Intermediate to Edge Intelligence in 2 days

Make your iPhone apps think - locally, smartly, and with flair!

Forget the lectures that start with “Hello everyone, welcome to iOS 101.” You already know view controllers, delegates, SwiftUI, and networking. What you want is to build next-gen apps — ones that don’t just fetch from servers, but reason on the device, use the camera intelligently, talk to LLMs (locally or via API), and impress your users with speed and privacy.

Over two days, you’ll level up from “just another app dev” to “AI edge architect.” You’ll build camera apps that see, understand, and generate. You’ll integrate TensorFlow Lite, run small LLMs on device, and call big ones via API — all in a fun, hands-on environment. The instructor has 30+ years in industry (not academia) and will drop real patterns, war stories, and pitfalls — not just textbook code.

Learning Outcomes

By the end of this 2-day bootcamp, participants will be able to:

  • Design and implement iOS apps that run ML inference on device using TensorFlow Lite (TFLite) or related runtimes
  • Integrate camera pipelines (live video / capture) with ML models to build vision-based features
  • Embed or interface with small local LLMs or SLMs (small language models) on iOS
  • Connect to remote LLM APIs (e.g. OpenAI, Anthropic, or custom endpoints) securely and effectively
  • Architect a hybrid AI system: decide what runs locally vs remotely, manage latency, memory, fallback
  • Optimize performance, quantization, and resource use (Neural Engine, GPU, thread scheduling)
  • Debug, profile, and improve AI features in real apps (not toy demos)
  • Walk away with a mini portfolio: a camera-AI demo and a hybrid LLM app

Prerequisites (What Participants Must Already Know)

  • Proficiency in Swift (or Swift + some Objective-C)
  • Solid experience in UIKit / SwiftUI, app lifecycle, concurrency (GCD, async/await)
  • Comfort with Xcode, debugging tools, and asset pipelines
  • Basic familiarity with ML/AI concepts: neural networks, model training, inference, quantization (helpful but not strictly required)
  • API integration experience (REST / GraphQL)

Training Guideline

1. Setting the Stage & Architecture Thinking

  • Why edge AI is different — latency, privacy, offline, compute constraints
  • Hybrid AI architectures: on-device vs API vs fallback
  • Memory, battery, concurrency trade-offs
  • Example real-world apps: what they run locally vs remotely
  • Project setup: scaffolding two parallel demo apps (vision + language)

2. TensorFlow Lite on iOS

  • Choosing runtimes: TFLite, LiteRT, Core ML conversions
    • Google’s LiteRT and how to include it in iOS via CocoaPods / prebuilt libs
  • Converting models to .tflite / tuning / quantization (8-bit, 4-bit)
  • Load the model, allocate tensors, run inference in Swift
  • Image preprocessing, normalization, buffer layout
  • Delegate use: GPU, Metal, Core ML delegate
  • Handling multiple inputs/outputs, dynamic shapes
  • Debugging and profiling inference time
  • Optional: on-device training (if model supports it) — caveats for iOS (note: TFLite supports on-device training more mature on Android; iOS support is limited)

3. Camera + Vision Pipeline Integration

  • Capturing frames (AVCaptureSession, sample buffers) and converting to ML input
  • Real-time inference vs batch
  • Overlay UI: bounding boxes, heat maps, segmentation masks
  • Optimizing frame rate and dropping frames gracefully
  • Image preprocessing strategies: cropping, resizing, letterboxing
  • Example mini projects:
    • Object detection / bounding boxes
    • Pose estimation
    • Style transfer / filter effects
  • Using intermediate output (e.g. landmarks) to drive UI / behavior

4. Local LLMs / SLMs on iOS

  • What counts as “local LLM” in 2025 — small quantized models (≤ ~3B parameters), GGUF, llama.cpp, llm.swift etc
  • Converting / quantizing LLM models to mobile formats
  • Loading the local model, memory constraints, offloading to Neural Engine
  • Prompting, context windows, tokenization on device
  • Performance tuning, threading, streaming responses
  • Integrating with your app UI (chat view, partial streaming)
  • Fallback / hybrid mode: detect if local fails, switch to API
  • MediaPipe’s LLM inference API for iOS (running entirely on device)
  • Discussion of Apple’s new Foundation Models local support (if applicable)

5. Calling Remote LLM APIs

  • API design considerations (rate limits, tokens, cost, privacy)
  • Secure key storage in iOS (Keychain, secure enclave)
  • Incremental / streaming API calls (e.g. OpenAI streaming) in Swift async
  • Prompt engineering for mobile apps: chunking, context window sliding
  • Managing network latency, retries, fallback to local or degraded mode
  • Combining local state + remote model: caching, memory summarization

6. Putting It All Together: Hybrid AI App

  • App architecture: model manager, inference layer, fallback logic
  • Sample app idea 1: “Camera Chat”
    • User takes a photo → run object detection + image captioning (TFLite) → send caption + context to LLM → show generated narrative or ask follow-up
  • Sample app idea 2: “On-device Assistant + Cloud Boost”
    • A chat app that first tries local LLM, if local fails or context is too long, send to API
    • Manage memory: summarization, trimming context
  • UI considerations: latency feedback, partial results, “thinking” states
  • Logging, metrics, fallbacks, and versioning
  • Testing / QA: how to test your AI features (unit, integration, performance)

7. Optimization, Profiling & Best Practices

  • Instruments, Time Profiler, GPU counters
  • Memory footprint, model loading/unloading, resource cleanup
  • Threading strategies, off-main-thread batching
  • Model versioning and over-the-air updates (via remote model downloads)
  • Quantization and pruning strategies
  • Fallback heuristics: when to switch to remote, when to degrade features
  • Edge cases: OOMs, overheating, battery drain mitigation
  • Privacy & data handling: user data, prompt sanitization, on-device vs cloud tradeoffs

8. Wrap-up, Demos & Next Steps

  • Participants demo their mini AI apps
  • Group code review, common pitfalls discussion
  • Roadmap: scaling to larger models, federated learning, edge clusters
  • Resources: model hubs, ML conversion tools, huggingface, llm.swift, etc.
  • Bonus: how to deploy your apps in App Store with AI licensing/disclosure

NOTE: Versions and dependencies are always changing. As such, the proposed apps, libraries and topics may be modified by the trainer as needed.

Practical, connected learning

My wider training approach brings hands-on implementation and systems thinking together, connecting technology with real operational needs.