CwlUtils
A collection of utilities written as part of articles on Cocoa with Love
Included functionality
The following features are included in the library.
- CwlStackFrame.swift from Better stack traces in Swift
- CwlSysctl.swift from Gathering system information in Swift with sysctl
- CwlUnanticipatedError.swift from Presenting unanticipated errors to users
- CwlScalarScanner.swift from Swift name demangling: C++ vs Swift for parsing
- CwlRandom.swift from Random number generators in Swift
- CwlMutex.swift from Mutexes and closure capture in Swift
- CwlDispatch.swift from Design patterns for safe timer usage
- CwlResult.swift from Values and errors, part 1: 'Result' in Swift
- CwlDeque.swift from Optimizing a copy-on-write double-ended queue in Swift
- CwlExec.swift from Specifying function execution contexts
- CwlDebugContext.swift from Testing actions over time
Adding to your project
The CwlUtils library requires the Swift Package Manager. Minimum requirements are iOS 8 or macOS 10.10 and Swift 5.0.
Add the following to the dependencies
array in your "Package.swift" file:
.package(url: "https://github.com/mattgallagher/CwlUtils.git", from: Version(3, 0, 0)),
NOTE: even though this git repository includes its dependencies in the Dependencies folder, building via the Swift Package manager fetches and builds these dependencies independently.
CocoaPods and Carthage
Up to version 2.2.1, this library supported CocoaPods and Carthage. If you wish to use these package managers, you can check out the CwlUtils 2.2.1 tag