Keep this README simple. For full setup and details, see the official Swift guide: https://docs.joyfill.io/ios/getting-started
This repo provides Joyfill SDKs for Apple platforms (Swift, SwiftUI):
- Joyfill: UI components to display and interact with Joyfill documents (forms, tables, formulas).
- JoyFillModel: Data models with advanced field types and structures.
- JoyfillFormulas: Formula engine for calculations, strings, dates, arrays, and logic.
- JoyfillAPIService: Networking for the Joyfill API.
More APIs and concepts: https://docs.joyfill.io/ios/getting-started
- iOS 15+ (minimum deployment target)
In Xcode: File > Add Packages, then add this URL:
https://github.com/joyfill/components-swift
Choose the libraries you need and the desired version (latest recommended).
Render a Joyfill document with the Form view using a DocumentEditor:
import SwiftUI
import Joyfill
import JoyfillModel
struct FormContainerView: View {
let editor: DocumentEditor
init(document: JoyDoc) {
editor = DocumentEditor(document: document)
}
var body: some View {
Form(documentEditor: editor)
}
}- Sample JSON: /first-form.json
- Simple usage: /SimpleFormExampleView
- SwiftUI example app: /JoyfillSwiftUIExample
- UIKit example app: /JoyfillUIKitExample
- Flutter demo: /joyfillflutterexample
-
JoyDoc
- Standardized JSON structure used by Joyfill components, APIs, and exports. Guide: JoyDoc usage
-
DocumentEditor
- Core editor for a
JoyDoc; pass toFormto render. - Field validation:
validate()checks field-level rules (e.g., required, formats). - Includes Change API (
change(changes:)) for programmatic updates. See Change API section in document-editor.md - Guide: document-editor.md
- Core editor for a
-
Schema validation
- Checks document schema and version compatibility.
- Guide: validate.md
-
Change events
- Observe
onChange,onFocus,onBlur, uploads, capture, and errors. - Guide: change-events.md
- Observe
For parameters, properties, events, tables, charts, and formulas, see the docs below.
- Swift setup: https://docs.joyfill.io/ios/getting-started
- API reference: https://docs.joyfill.io/ios/api-reference/overview
- Formulas: https://docs.joyfill.io/web/guides/formulas#enabling-formulas
- Changelogs: https://docs.joyfill.io/ios/changelogs/RELEASE_NOTES
