Categories
Featured iPhone Development Resources iOS Development Libraries Open Source iOS Libraries And Tools Swift

Overdrive – Swift Library Easily Creating Asynchronous, Concurrent Multi-Threaded Code

Overdrive from Said Sikira is an open source Swift framework created to help you optimize your apps speed by providing a simple API for concurrency and multi-threading.

Overdrive provides tasks which allow you to execute any work synchronously or asynchronously and also adds queues for running tasks in the most efficient manner even concurrently.

This snippet from the readme shows how one could easily create a task for URL request with 3 attempts, and run that code in the background:

let task = URLSessionTask("https://api.swiftable.io")

task
  .retry(3)
  .onValue { json in
    print(json["message"])
  }.onError { error in
    print(error)
  }

TaskQueue.background.add(task: task)

You can read more about Overdrive on the Swiftable site.

You can find the Overdrive library on Github here.

A great library for anyone looking to for creating asynchronous and multi-threaded Swift code.