I'm happy to announce the recent 1.0.0 release of the Temporal Swift SDK ![]()
When we first announced the Temporal Swift SDK last November, it provided the foundation for building durable, reliable workflows in Swift using familiar async/await patterns and macros. Since then, the SDK has reached feature parity with other Temporal SDKs, addressing API stability and developer experience improvements. Here are the highlights.
Workflows are now structs
The most significant API change in 1.0.0 is that workflows are now defined as structs instead of classes. This was a deliberate design shift that leans into Swift's type system to enforce correctness at compile time. For example, query handlers and update validators are now statically prevented from mutating workflow state, something that previously required runtime checks. This is a breaking change but migrating from previously class based workflows to struct based workflows is often as easy as changing class to struct .
WorkflowReplayer for detecting nondeterminism
Building durable workflows means your code must be deterministic, given the same inputs and history, it must always make the same decisions. But verifying this during development can be difficult. The new WorkflowReplayer lets you replay recorded workflow histories against your current code to detect nondeterminism errors before they hit production. It supports importing histories from the Temporal CLI or UI as JSON, and can replay individual histories or run batch checks across many workflows at once.
Public proto types and API stability
Early on, the SDK wrapped Temporal's generated protobuf types in custom Swift wrappers to provide "swiftier" APIs. In practice, maintaining those wrappers added significant cost and diverged from every other Temporal SDK. Starting with this release, the generated proto types are exposed publicly and all public enums are marked @nonexhaustive, so future regenerations of the proto definitions won't break your code.
Other notable changes
-
Workflow authoring and API ergonomics:
@WorkflowQueryon properties: Queries that just return a property value no longer need a dedicated method. Annotate the property directly with@WorkflowQuery.- Update validators: The
@WorkflowUpdatemacro now accepts a validator: parameter to run validation logic before the update handler executes. - ExternalWorkflowHandle: Signal and cancel workflows by ID from within other workflows.
-
Client and cloud operations:
- Signal-with-start and update-with-start: Atomically start a workflow and send a signal or update in a single operation.
- Temporal Cloud API key authentication: In addition to mTLS, you can now authenticate with Temporal Cloud using API keys.
-
Testing:
- Activity testing: New
withActivityTestEnvironmentmethods inTemporalTestKitfor testing activities that rely onActivityExecutionContext, including heartbeat support.
- Activity testing: New
Getting started
To get started, add the SDK to your Package.swift:
.package(url: "https://github.com/apple/swift-temporal-sdk.git", from: "1.0.0"),
Check out the documentation and the example projects to see the SDK in action.
Community and feedback
The Temporal Swift SDK is an open source project and we welcome contributions, bug reports, and feature requests. Visit the repository to get involved.