inflearn logo

[Lv.5] SwiftUI with AI - Building AI Apps with Apple Intelligence

For those of you who have completed intermediate SwiftUI, it is now time to integrate AI into your apps. Complete an on-device AI app that runs locally without an internet connection using Apple Intelligence and the FoundationModels framework.

2 learners are taking this course

Level Intermediate

Course period Unlimited

iOS
iOS
Swift
Swift
SwiftUI
SwiftUI
AI
AI
iOS
iOS
Swift
Swift
SwiftUI
SwiftUI
AI
AI

What you will gain after the course

  • Ability to implement on-device AI in SwiftUI apps

  • Practical implementation skills for Streaming, Guided Generation, and Tool Calling

  • AI Emotion Diary App MoodMate Completed

  • AI app architecture design skills, including sessions, context windows, and error handling

⚠️ Must-read before taking the course - Practice environment and device requirements

⚠️ This course uses the Apple FoundationModels framework.

This technology is currently in the beta stage, and the API and operation methods may change according to Apple's updates.

The course content will be continuously updated as changes occur.

⚠️ Supported Devices (Required Check)

  • iPhone: iPhone 15 Pro or later + iOS 18.0 or later (Physical device required for Preview)

  • Mac: Apple Silicon (M1 or later) + MacOS 15.0 Sequoia or later

  • iPad: M1 chip or later, iPadOS 18.0 or later

  • Simulator cannot be used - FoundationModels must run on an actual device or My Mac build

⚠️ Development Environment

  • Xcode: 26.0 or higher

  • OS: macOS 15.0 Sequoia or later

  • Apple Intelligence activation required (System Settings -> Apple Intelligence & Siri -> On)

This course is based on iPhone 17. If you do not have an iPhone device, you can complete all exercises using the My Mac build. (However, separate Frame settings are required)


Do you absolutely need a server and an API key to add AI features to a SwiftUI app?

The answer lies in Apple FoundationModels .

In an era where AI functionality has become a core competitive advantage for apps, developers still struggle with external API costs, privacy leak concerns, and dependence on internet connectivity. The solution to all these problems is FoundationModels, the on-device AI framework of Apple Intelligence.

In this course, you will learn how to implement AI features that run directly on-device using SwiftUI and FoundationModels, and apply them through a real-world project (MoodMate - AI Emotion Diary).
You will elevate your AI app development capabilities by practicing the entire process, including streaming response handling, @Generable structured output, Tool Calling, and Session Context Window management.

💬 "I can just build apps with ChatGPT, Gemini, and Claude, so do I really need to learn FoundationModels?"

I also actively use the Claude and ChatGPT APIs in my practical work. In fact, my productivity has increased significantly.

However, there is a reality you face when launching an app. API costs increase as the number of users grows. The fact that users' diaries, memos, and conversation details are transmitted to external servers must be explicitly stated in the App Store review process and privacy policy. Furthermore, without a network connection, the AI features themselves stop working.

FoundationModels solves these three problems all at once.

Here is the conclusion

  1. Cloud AI and on-device AI are not competitors, but rather tools with different purposes.

  2. For iOS apps that handle personal data, FoundationModels is the choice that simultaneously addresses cost, security, and offline access.

💬 "Isn't on-device AI less powerful than cloud AI?"

To be honest, you're right. For tasks requiring complex reasoning or vast knowledge, large cloud models like GPT-4, Claude, and Gemini are superior.

However, polishing diary entries, sentiment analysis, book summaries, and simple Q&A — the AI features actually needed in daily apps can be sufficiently implemented with on-device models. In fact, response speeds are often faster than those of cloud models.

Apple Intelligence is still in the beta stage, and it is true that its performance lags behind other large models. However, what matters is the direction.

Smartphone AP performance is improving rapidly every year. The iPhone in your hand today will be able to run much more powerful AI models in two to three years. The on-device AI market is expected to grow from approximately $33.2 billion in 2026 to $156.6 billion by 2033.

On-Device AI 2026: Why AI Is Moving to Your Phone

Apple's Privacy-First AI Strategy: On-Device LLMs by 2026

Due to security and privacy issues, the shift from cloud-based AI services to on-device AI has already begun. The era where the smartphone you carry becomes a powerful AI model itself is approaching.

The conclusion is this

  1. Learning FoundationModels now means being the first to prepare for the era of on-device AI.

  2. Apple Intelligence is in beta, but with the improvement in AP performance, the trend is already shifting toward on-device.

Features of this course 🚀


Directly connecting On-Device AI to SwiftUI: No servers, no API keys, and no internet required. You will learn the entire process of implementing AI features that run within the device using Apple FoundationModels into a SwiftUI app.

Immediately applicable in practice: Covers all essential AI features for real-world projects, including streaming response handling, @Generable structured output, Tool Calling, and Session Context Window management.

Concept -> Code -> Verification: Every line of code is written and tested firsthand, and its actual operation is verified through a completed app (MoodaMate).

A course for intermediate SwiftUI developers and above: If you are an iOS developer who has experience with SwiftUI basics and Async/Await, you can take on the challenge right away! Upgrade your AI app development skills to the next level.

Recommended for these people 🙋‍♂

iOS developers who want to integrate AI features into their apps

Intermediate developers who want to understand the core of FoundationModels and directly implement on-device AI features into SwiftUI apps.

Those who want to learn through a hands-on project
Those who want to complete a real-world app (MoodMate) while learning core AI technologies such as streaming responses, structured output, and Tool Calling

Those interested in the latest Apple technology
Those who want to experience Apple Intelligence and FoundationModels firsthand and keep up with the latest AI trends in iOS development

Here's what you'll learn. 📚

Building a Foundation with FoundationModels

• Understand the structure and operating principles of the Apple Intelligence and FoundationModels frameworks.

• From implementing your first AI conversation to analyzing Response objects, error handling, and availability checks - you will learn the entire process of making AI calls on an actual device step-by-step.


Prompt Engineering

• The quality of AI responses varies depending on how the same question is phrased. You will learn effective prompt writing principles by directly comparing them through code.

• Covers the differences between the String approach and the Prompt object approach, dynamic prompt construction, and handling Guardrail Violations.

Session & Instructions

• Understand how Sessions work to maintain conversation context with AI.

• Learn how to define the AI's role and tone using Instructions, and understand the limitations and management strategies of the Context Window.

Generation Options

• Experiment directly with how Temperature and Sampling Mode (Greedy, Top-K, Nucleus) affect AI output.

• Learn how to control response length by setting token limits and master the optimal combination of options for different situations.

Guided Generation

• Understand the concepts and advantages of the @Generable macro, which allows AI to directly generate predefined Swift structures instead of free text.

• Practice all patterns of structured output, from @Guide constraints, Enum generation, nested structs, and Streaming + Generable combinations, to array streaming.

Tools

• Understand the concept and operating principles of Tool Calling, where AI directly calls external functions.

• We will implement step-by-step everything from Tool protocol implementation, structured Tool responses, Tool error handling, and combining multiple Tools to Tools integrated with external APIs.

Transcript

•Learn how to read the Transcript, which is the conversation history with the AI, and utilize it for debugging.

•It covers patterns for recovering conversations when the Context Window is exceeded, as well as Conversation Persistence for permanently storing conversation history.

Hands-on Project - MoodMate (AI Emotional Diary App)

•Complete a fully functional AI app from start to finish using the combination of SwiftData + FoundationModels.

• Text streaming where AI refines original diary entries, structured analysis of emotions, intensity, keywords, and advice using @Generable, along with session caching and management - we will implement and integrate all previously learned features into a single app.

Practical Project - TodayBooks with AI - Scheduled for update in late June (Currently filming)

• Complete a complex, real-world app that handles both external APIs and on-device AI by integrating the Kakao Book Search API with FoundationModels.

• From AI streaming that summarizes book introductions into 3 lines, to recommending the next book based on reading patterns using @Generable, and even multi-turn Q&A conversations with books - we will apply all features of FoundationModels to a single real-world app.

PDF theory materials and practice files provided

• All necessary PDF materials and Xcode project files for the lecture are provided.

• You can immediately practice and apply the lecture content through step-by-step code examples.


Through all these processes, you will gain the ability to integrate on-device AI into SwiftUI and be able to directly implement AI functions that work in real apps! 🚀

Prerequisite Courses

If you are familiar with the basic concepts of SwiftUI and Swift, you can start this course right away.

However, if you are unfamiliar with basic SwiftUI knowledge, SwiftData, or Async/Await, I recommend taking the courses below first.

Recommended for
these people

Who is this course right for?

  • iOS developers who have learned SwiftUI but feel lost on how to integrate AI features.

  • App developers who are delaying the adoption of AI because they are worried about costs and privacy when using the ChatGPT API

  • Developers who want to create AI apps but haven't started because they don't know if it's possible without a server or backend.

  • Students who have completed the SwiftUI series (Lv.1–4) and wish to move on to the next level

  • SwiftUI developers who are anxious about falling behind AI trends but don't know where to start studying.

Need to know before starting?

  • You must be familiar with basic SwiftUI syntax and how to construct views. (SwiftUI Basic Lv.1 recommended)

  • You must have an understanding of Swift's basic syntax, such as optionals, closures, and protocols.

  • It is recommended to have a basic understanding of Async/Await asynchronous programming. (SwiftUI Networking. Lv.3 recommended)

  • An Apple Silicon Mac (M1 or later) or an iPhone 15 Pro or later device is required. (On-device execution of FoundationModels is mandatory)

Hello
This is jacobko

880

Learners

49

Reviews

49

Answers

5.0

Rating

5

Courses

Student discount always available

For students who find the course fee burdensome, please use your school email account, e.g., @***.ac.kr, @***.edu

If you send me an email, I will send you a discount coupon (50%) for all courses.

👉jacobko@kakao.com


Hello, I'm Jacob, an iOS developer.

I am currently based overseas, balancing iOS app development with teaching.

  • Participated as an iOS developer in startups in Australia and New Zealand, with experience launching apps on the App Store.

  • Led multiple migration projects transitioning UIKit-based legacy apps to SwiftUI

  • Designing a practical-focused lecture curriculum based on experience collaborating with overseas teams

Based on the experience I gained firsthand in overseas development environments rather than domestic ones, I am creating a SwiftUI course that can be applied directly to real-world projects, going beyond mere theory.

If you steadily follow the curriculum, which is organized as a series from Lv.1 to Lv.4, I will take full responsibility to ensure you systematically master the core of iOS development.

More

Curriculum

All

65 lectures ∙ (21hr 2min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

jacobko's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

Limited time deal

$157,300.00

35%

$187.00