Apple’s Foundation Models framework gives iOS developers direct access to the on-device language model behind Apple Intelligence. But building a useful AI application involves much more than sending a prompt and displaying a response.
In this course, you will build a complete AI chat application using SwiftUI and the Foundation Models framework. You will begin by creating a basic language model session and then gradually develop the models, views, and services needed to support a complete chat experience.
You will use @Generable to create strongly typed responses and build a chat engine responsible for communicating with the model. You will then display user and assistant messages using a custom SwiftUI interface.
Next, you will extend the model with tools. You will create a reusable HTTP client and build a Movie Tool that searches the OMDb API. The language model will be able to recognize movie-related requests, invoke the tool, and use the returned information to generate its response.
As the application grows, you will discover an important challenge: a model with several responsibilities may not always choose the correct tool or behavior. To address this, you will build an intent classifier that identifies whether a request is a general question, a movie question, or a request for nearby places.
You will then create multiple Foundation Models sessions, each designed for a specific responsibility. This multi-step prompting approach gives you greater control over how requests are processed and helps keep tools isolated to the sessions that need them.
Finally, you will build a Place Tool using the user’s location and MapKit. The model will be able to search for nearby points of interest, and your SwiftUI application will display the results on a map.
By the end of the course, you will have built an AI chat application that combines SwiftUI, guided generation, tool calling, intent classification, multiple model sessions, networking, location services, and MapKit.
What You Will Learn
- Create and configure a LanguageModelSession
- Send prompts to Apple’s on-device language model
- Generate strongly typed responses using @Generable
- Design models for user and assistant chat messages
- Build a chat engine for managing model interactions
- Display a complete chat conversation with SwiftUI
- Create a reusable networking layer with HTTPClient
- Build a custom Movie Tool using the OMDb API
- Register tools with a Foundation Models session
- Understand how and when the model invokes tools
- Build an intent classifier using Foundation Models
- Route requests to specialized model sessions
- Create separate sessions for general and movie-related requests
- Access the user’s location
- Build a Place Tool using MapKit
- Search for nearby points of interest
- Display locations using a SwiftUI map
Who This Course Is For
This course is designed for iOS developers who are comfortable with Swift and SwiftUI and want to build practical applications with Apple’s Foundation Models framework.
You do not need previous experience with machine learning, large language models, or AI development. The course focuses on using the Foundation Models framework from an iOS developer’s perspective.
Requirements
- Basic knowledge of Swift
- Familiarity with SwiftUI
- Basic understanding of asynchronous programming in Swift
- A Mac with a recent version of Xcode
- A device that supports Apple Intelligence
- An OMDb API key for the Movie Tool section
If you are ready to move beyond basic prompts and learn how to build an AI chat application with tools, routing, specialized sessions, location services, and maps, this course will walk you through the complete process.
Course Video
Curriculum
Mohammad Azam
Mohammad Azam is a highly experienced and accomplished developer with over a decade of professional experience in writing software. He has played an integral role in the success of several Fortune 500 companies including Valic, AIG, Dell, Baker Hughes, and Blinds.com, where he served as a lead mobile developer.
Azam's expertise has helped him become a top instructor on both Udemy and LinkedIn, with more than 100K students enrolled in his courses. He currently serves as a lead instructor at DigitalCrafts, a software bootcamp where he trains developers who now work at prestigious companies like Apple, JP Morgan Chase, and Exxon.
Azam is not only a developer and instructor but also an international speaker who has been sharing his knowledge and expertise since 2006. In his free time, he enjoys exercising and planning his next adventure to explore the unknown corners of the world.
Single-Course License
$89
Full access to this course only
This is a one-time payment that grants access to this course only, not to any other courses.
Buy NowAzamSharp Pro Membership
$39 /Month
Unlimited access to this and all other current & future courses
This is a recurring payment, charged automatically on a monthly basis.
Become a Pro