Exploring Foundation Models
Overview
"This book has allowed me to be what I saw myself as being with Foundation Models. I feel I can legitimately use them expressively now. I needed this.
~Adrian Eves
This book teaches iOS, macOS, and visionOS developers how to integrate Apple's Foundation Models directly into their apps. Build features like streaming interfaces, structured data extraction, tool calling, and more.
All running on-device with Apple's privacy guarantees.
You can find the detailed table of contents here: https://rudrank.com/pdfs/foundation-models-table-of-contents.pdf
In this book, you will learn how to build on-device AI apps using Apple's Foundation Models framework:
What you get:
- 156 pages PDF
- EPUB for Kindle
- LLMs text to use with AI (~41,354 tokens)
Foundation Models with Apple Intelligence
1. Introduction to Foundation Models
Apple's framework for accessing on-device Apple Intelligence models, including guided generation, tool calling, and stateful sessions for iOS 26.0+
2. Getting Started with Sessions
Setting up your first AI session and understanding model availability, error handling and different generation configuration options.
3. Generation Options and Sampling Control
Shaping model behavior with temperature, penalties, and other parameters to control output quality and creativity
4. Streaming and Snapshots
Building responsive UIs with partial results and understanding how Foundation Models streams complete object snapshots instead of token deltas
5. Structured Generation with Schemas
Creating type-safe, structured output directly from AI responses using the @Generable framework
6. Advanced Chat Patterns
Building production-ready conversation interfaces with context management, memory handling, and graceful error recovery
7. Basic Tool Use
Enabling your AI to perform actions and access real-world data with practical examples of working with web search APIs
8. Integrating External JSON APIs
Reusing your Foundation Models schemas with external providers like OpenAI, Anthropic, and Google through JSON Schema compatibility
9. Safety and Best Practices
Implementing responsible AI features with proper guardrails, user protection, and Apple's safety principles for trustworthy experiences
10. Supported Languages and Internationalization
Working with Foundation Models across 14 supported locales, handling multilingual conversations, and session management strategies for global apps
Upcoming chapters:
11. Foundation Models And App Intents
Using Foundation Models in app extensions, widgets, shortcuts, and system integrations while maintaining session-based patterns
12. Dynamic Generation Schemas
Runtime schema construction and complex data modeling for advanced structured generation patterns
13. Advanced Tool Patterns
Production integrations with external APIs and services, including retry strategies, fallback handling, and security considerations
14. Performance Optimization and Profiling
Using Foundation Models instruments in Xcode for production deployment, including memory management, token optimization, and performance monitoring
15. Training Custom Adapters
Specializing Foundation Models for your app's domain and writing style using Apple's adapter training toolkit with cost-effective cloud GPU workflows
Use the code "STUDENT" for a discount if you are a student.
© Copyright 2025 — Rudrank Riyam's Academy