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-Storyboard
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
R.swift
Strong typed, autocompleted resources like images, fonts and segues in Swift projects -
SwiftGen
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
Dollar
A functional tool-belt for Swift Language similar to Lo-Dash or Underscore.js in Javascript -
swift-protobuf
Plugin and runtime library for using protobuf with Swift -
EZSwiftExtensions
:smirk: How Swift standard types and classes were supposed to work. -
DifferenceKit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection. -
DeepDiff
🦀Amazingly incredible extraordinary lightning fast diffing in Swift -
Device
Light weight tool for detecting the current device and screen size written in swift. -
SwiftLinkPreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
WhatsNew
Showcase new features after an app update similar to Pages, Numbers and Keynote. -
Codextended
Extensions giving Swift's Codable API type inference super powers 🦸♂️🦹♀️ -
SwiftyJSONAccelerator
macOS app to generate Swift 5 code for models from JSON (with Codeable) -
Playbook
📘A library for isolated developing UI components and automatically taking snapshots of them. -
ReadabilityKit
Preview extractor for news, articles and full-texts in Swift -
Compass
:earth_africa: Compass helps you setup a central navigation system for your application -
ObjectiveKit
Swift-friendly API for a set of powerful Objective C runtime functions. -
Pythonic.swift
Pythonic tool-belt for Swift – a Swift implementation of selected parts of Python standard library. -
Prototope
Swift library of lightweight interfaces for prototyping, bridged to JS.
Appwrite - The Open Source Firebase alternative introduces iOS support
* 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.