Appcoda
Read post

Working with @Generable and @Guide in Foundation Models

The Foundation Models framework in iOS 26 introduces @Generable and @Guide macros that automatically convert unstructured language model responses into typed Swift structs. The @Generable macro marks structs for automatic conversion, while @Guide provides specific instructions to the model for generating properties like array counts and descriptions. A vocabulary quiz app demonstrates how to generate structured Question objects with text, choices, answers, and explanations directly from model output, eliminating manual parsing.

    #ai#machine-learning#apple#ios#swift
Jul 18, 2025•6m read time•From appcoda.com
Post cover image
Table of contents
The Demo AppUsing @Generable and @GuideBuilding the Quiz AppSummary
11 Impressions
Appcoda's image
Appcoda

AppCoda's resource offers insights, tutorials, and resources for iOS app developers. Readers can lea...

32 Followers

•

47 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard