Releases: ricky-stone/SwiftFM
SwiftFM 2.0.0
SwiftFM 2.0.0
SwiftFM 2.0.0 is a major beginner-first update for Apple's Foundation Models.
Highlights
- new SwiftUI-style fluent builders with
SwiftFM.configuration(),SwiftFM.request(), andSwiftFM.prompt(...) - chainable modifiers for
Config,RequestConfig,PromptSpec,ContextOptions, andTextPostProcessing - dynamic schema generation and schema-driven structured streaming
- typed structured streaming with
streamJSON(...) - locale helpers,
26.4+token counting, feedback attachment export, and custom adapter helpers - improved Foundation Models generation error descriptions
- rewritten README focused on simpler beginner onboarding while keeping advanced features documented
Validation
swift test
SwiftFM 1.2.0
SwiftFM 1.2.0
Added
- Structured prompt APIs with
SwiftFM.PromptSpec(generateText(from:),streamText(from:),streamTextDeltas(from:), plus context overloads). - Output post-processing with
SwiftFM.TextPostProcessing(whitespace cleanup, paragraph normalization, decimal rounding). - Context embedding controls with
SwiftFM.ContextOptions(heading+ JSON formatting). - Public source marker:
SwiftFMVersion.current == "1.2.0".
Changed
ConfigandRequestConfignow supportcontextOptionsandpostProcessing.- Text generation and streaming now apply optional post-processing before returning results.
- README fully rewritten with beginner-first + power-user Swift/SwiftUI examples.
SwiftFM v0.3.0
This release updates the README to include Swift Testing examples, showing how to validate
text generation, streaming, and guided JSON output in practice.
Added
- Testing section in README with real Swift Testing examples.
- Examples include:
- Plain text generation
- Streaming text generation
- Guided JSON with @generable models
Notes
- No changes to the SwiftFM API.
- Safe for Swift 6 with strict concurrency enabled.
SwiftFM v0.2.0 – Streaming Text & Docs Update
New Feature
- Added
streamText(for:)API- Supports progressive text generation using
AsyncThrowingStream. - Enables more responsive UIs in SwiftUI (live output as chunks arrive).
- Example usage included in README.
- Supports progressive text generation using
Documentation
- Expanded README with:
- Streaming text usage examples (console + SwiftUI).
- Attribution section encouraging courtesy credit to Ricky Stone.
- Clarified availability and platform support.
Why this release matters
This release marks SwiftFM’s evolution from simple one-shot responses to
supporting real-time generation. Developers can now build more interactive
apps with Foundation Models on-device.
SwiftFM v0.1.1
SwiftFM is a lightweight façade over Apple’s new FoundationModels framework, designed to make working with on-device language models simple and beginner-friendly.
Features
- Plain text generation – pass a prompt, get back a string
- Guided typed generation – decode directly into your own
Decodable & Generablestructs - Beginner-friendly API – minimal surface and sensible defaults
- Availability helpers – check if the model is ready on the device
- On-device, no servers required
Requirements
- iOS 26+ / iPadOS 26+ / macOS 26+
- Apple Intelligence enabled on the device or Mac
- Not supported on watchOS or tvOS
Notes
This is the first public release. The API is intentionally minimal, focusing on core use cases:
generateText(for:)generateJSON(for:as:)isModelAvailableandmodelAvailabilityReason
Expect additional features such as streaming and advanced generation options in future versions.
License
MIT