A Swift library for writing asynchronous code using futures and promises, now superseded by Swift's async/await.
BrightFutures is a Swift library that implements futures and promises to simplify asynchronous programming. It allows developers to write cleaner, more maintainable async code by replacing nested completion blocks with functional chaining and type-safe error handling. The library is now end-of-life, as Swift's native async/await has made it obsolete.
Swift developers building iOS, macOS, or server-side applications who need a robust solution for managing asynchronous operations before adopting Swift's async/await.
BrightFutures offers a production-proven, idiomatic Swift implementation of futures and promises with extensive functional composition utilities, making async code more readable and less error-prone compared to traditional callback patterns.
Write great asynchronous code in Swift using futures and promises
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports map, flatMap, zip, and filter for transforming and combining futures, enabling clean chaining of async operations as shown in the login-to-posts example.
Includes recover and recoverWith methods for graceful error recovery with fallback values or futures, reducing callback nesting.
Allows precise execution contexts with GCD queues and operation queues, making it easy to manage callback threading, especially for UI updates.
Provides invalidation tokens to manage callbacks in reusable UI components like table view cells, preventing stale updates.
Officially end-of-life and superseded by Swift's native async/await, meaning no future updates, security patches, or compatibility fixes.
Requires understanding functional concepts like futures and promises, which can be daunting compared to simpler callback patterns or modern async/await.
As a deprecated library, it lacks integration with newer Swift concurrency tools and has dwindling community resources, making troubleshooting harder.