Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. SwiftTask

SwiftTask

MITSwift5.0.0

A Swift library extending promises with progress tracking, pause, cancel, and retry capabilities.

GitHubGitHub
1.9k stars175 forks0 contributors

What is SwiftTask?

SwiftTask is a Swift library that extends the promise pattern with additional control flow features like progress tracking, pause, cancel, and retry functionality. It solves the problem of managing complex asynchronous operations in Swift applications by providing a unified API that goes beyond basic promise fulfillment and rejection.

Target Audience

Swift developers building applications that require robust asynchronous operation management, particularly those needing features like progress updates, cancellable tasks, or automatic retries for network requests.

Value Proposition

Developers choose SwiftTask because it combines the familiarity of promises with essential real-world features missing from basic promise implementations, eliminating the need to manually implement progress tracking, cancellation, or retry logic across their codebase.

Overview

Promise + progress + pause + cancel + retry for Swift.

Use Cases

Best For

  • Managing file downloads with progress indicators
  • Handling network requests that may need retries due to instability
  • Building media players with pause/resume functionality
  • Creating complex asynchronous workflows with cancellation support
  • Implementing task queues with progress monitoring
  • Wrapping existing async APIs with uniform control features

Not Ideal For

  • Projects using Swift's native async/await that don't require backward compatibility with promise patterns
  • Teams looking for a lightweight, minimal dependency for basic promise functionality without extra control features
  • Applications that prioritize reactive programming with Combine or RxSwift over promise-based approaches

Pros & Cons

Pros

Progress Tracking

Provides built-in progress updates for ongoing tasks, as demonstrated in the Alamofire example where download progress values are passed and monitored.

Enhanced Control Flow

Supports pause, resume, cancellation, and automatic retries via configurable closures, offering robust management beyond standard promises.

Familiar Promise API

Uses .then, .success, and .failure methods similar to JavaScript promises, making it accessible for developers already comfortable with promise chaining.

Task Composition

Includes Task.all, Task.any, and Task.some for combining multiple async operations, enabling flexible parallel execution strategies.

Cons

Verbose Setup

Configuring pause, resume, and cancel requires manual closure definitions, as shown in the basic example, adding boilerplate and complexity.

Outdated Documentation

Installation instructions point to a wiki page, and the project targets Swift 2.0, indicating potential maintenance issues and compatibility gaps with newer Swift versions.

Limited Community Support

Compared to mainstream libraries like PromiseKit, SwiftTask has fewer adopters, which may result in scarce resources and slower bug fixes.

Frequently Asked Questions

Quick Stats

Stars1,924
Forks175
Contributors0
Open Issues3
Last commit7 years ago
CreatedSince 2014

Tags

#retry-logic#async-await#progress-tracking#reactive-programming#cancellation#promises#task-management#concurrency#swift

Built With

S
Swift

Included in

iOS51.7k
Auto-fetched 1 day ago

Related Projects

PromiseKitPromiseKit

Promises for Swift & ObjC.

Stars14,238
Forks1,457
Last commit5 days ago
BoltsBolts

Bolts is a collection of low-level libraries designed to make developing mobile apps easier.

Stars5,622
Forks576
Last commit4 years ago
promisespromises

Promises is a modern framework that provides a synchronization construct for Swift and Objective-C.

Stars3,829
Forks310
Last commit1 year ago
HydraHydra

⚡️ Lightweight full-featured Promises, Async & Await Library in Swift

Stars1,991
Forks114
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub