This is a personal playground experimenting with Apple's newly introduced FoundationModel framework. The goal is to explore the capabilities of LanguageModelSession and @Generable macros for generating structured and intelligent Swift data using Apple Intelligence.
- Chat with AI using
LanguageModelSession— simple conversational interaction with Apple Intelligence. - Generate Recipes by passing selected ingredients to a custom
Recipestructure using@Generable. - Generate Person Structs using
@Generableand@Guidemacros — define constraints like age range or hobbies count.
@Generable: Automatically generate struct values using Apple Intelligence.@Guide: Provide field-level guidance for better, constraint-aware generation.LanguageModelSession: A session-based interface to interact with Apple’s large language model.
- 🧑💻 SwiftUI
- 🛠️ Xcode 26 Beta 2
- 📱 iOS 26 Beta 2
- 💻 macOS 26 Beta 2