A collection of useful Swift tools.
| Tool | Description |
|---|---|
CodableError |
Defines a Codable wrapper for Apple's Error. |
jsonDataFromFile(_:) |
Loads the contents of a JSON resource bundled with the app or test target. Returns a Data instance containing the raw bytes of the JSON file. |
Use Xcode's built-in support for SPM.
or...
In your Package.swift, add Toolbox as a dependency:
dependencies: [
.package(
url: "https://github.com/thatfactory/toolbox",
from: "0.1.0"
)
]Associate the dependency with your target:
targets: [
.target(
name: "YourTarget",
dependencies: [
.product(
name: "Toolbox",
package: "toolbox"
)
]
)
]Run: swift build