Wyrd alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view Wyrd alternatives based on common mentions on social networks and blogs.
-
SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity. -
SwiftGen
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
SwiftGen-Storyboard
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
SwiftLinkPreview
DISCONTINUED. It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
Playbook
📘A library for isolated developing UI components and automatically taking snapshots of them. -
BetterSafariView
A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI. -
SwiftPlantUML
A command-line tool and Swift Package for generating class diagrams powered by PlantUML -
Pythonic.swift
DISCONTINUED. Pythonic tool-belt for Swift – a Swift implementation of selected parts of Python standard library.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Wyrd or a related project?
Popular Comparisons
README
Wyrd
Wyrd is a library for asynchronous programming in Swift. It aims to be concise and simple. Wyrd is inspired by Promises/A+. Both Swift and Cocoa Touch doesn't provide any helpers for asynchronous programming besides standard functions taking success/failure callbacks. Wyrd tries to alleviate this with fairly simple API and a few helpers of its own.
How to Install
At the moment the most convenient way is to add Wyrd repository as a git submodule to your main repository:
git add submodule add https://github.com/explicitcall/Wyrd.git wyrd
Then add Wyrd.swift
and Helpers.swift
(add the latter if you will use helpers and most likely you will) files to your project.
CocoaPods package will be added as soon as CocoaPods will support source code in Swift.
How to Use
Essentially, Wyrd instance is a promise, which can be chained with other promises using closures and chaining operators. Wyrd library provides a few wrapper extensions for standard asynchronous Cocoa Touch functions. These extended functions return a promise instead of taking a success/error callback, giving you much clearer code and saving you from a Pyramid of Doom.
Obligatory example (getURLData
and FullResponse
typealias are provided to you by Wyrd):
let s = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration())
let u1 = NSURL(string: "https://api/endpoint1")
let u2 = NSURL(string: "https://api/endpoint2")
s.getURLData(u1) => { (full: FullResponse) -> Wyrd<FullResponse> in
let (data, response) = full
println("data1 length is \(data.length)")
return s.getURLData(u2)
} =~ { (full: FullResponse) in
let (data, response) = full
println("data2 length is \(data.length)")
}
This code issues two API calls in serial, the second will fail if the first fails.
Wrapping typical asynchronous Cocoa Touch code is fairly easy, just define a method/function which will return a Wyrd instance, which you will be able to chain. You will need to fulfil or reject the promise in the raw callbacks code to indicate when the promise will be able to chain further:
typealias FullResponse = (NSData!, NSURLResponse!)
extension NSURLSession {
func getURLData(url: NSURL) -> Wyrd<FullResponse> {
let result = Wyrd<FullResponse>()
let task = dataTaskWithURL(url) { data, response, error in
if let e = error {
result.reject(e)
} else {
result.fulfil(data, response)
}
}
task.resume()
return result
}
}
More examples and wrapper functions are coming soon.