withmarfa/swift-sdk. Pin to the major version that tracks your server.
Platforms: iOS 26+, iPadOS 26+, macOS 26+, watchOS 26+, tvOS 26+, visionOS 26+. On-device storage uses SwiftData — no third-party runtime dependencies.
Install
InPackage.swift:
https://github.com/withmarfa/swift-sdk.git.
Three client modes
One SDK, three factories. Pick the one that matches your app:- Remote
- Pure-local
- Synced
A thin typed HTTP client. Every call hits the server.Best for: server-first apps, scripts, CI, server-to-server integrations.
MarfaClient.fromEnvironment()— readsMARFA_API_URLandMARFA_API_KEY. Returnsnilif unset.MarfaClient.fromKeychain(service:account:url:accessGroup:)— loads the API key from the system Keychain. Pair withclient.saveToKeychain(service:account:accessGroup:)to persist one.
Configuration
ClientConfiguration controls retry, timeout, conflict strategy, and CDN routing:
retryPolicy on the configuration controls retry behavior for transient errors — bounded exponential backoff with jitter.
Where next
The rest of the Swift SDK surface splits across five focused pages: Authentication for OAuth 2.1 and Keychain helpers, Data access for items / edges / metadata / extensions / blobs / search, Typed models forCoreNote and custom-type codegen, Sync engine for SwiftUI reactive queries and the SSE replay loop, and Errors and testing for conflict handling, error types, and MarfaSDKTestSupport.