Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrapperon authored Jan 9, 2023
1 parent beda9dd commit c8198e1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A companion library to Point-Free's [`swift-dependencies`](https://github.com/po
## On the menu
[`Dependencies`](https://github.com/pointfreeco/swift-dependencies) is a fantastic library that helps you to manage your dependencies in a similar fashion SwiftUI handles its `Environment`. `Dependencies` already ships with many built-in fundamental dependencies, like `clock`, `uuid`, `date`, etc.

`Dependencies Additions` intends to extend these core dependencies, and provide coherent and testable implementations to many additional dependencies that are commonly needed when developing on Apple's platforms.
"Dependencies Additions" intends to extend these core dependencies, and provide coherent and testable implementations to many additional dependencies that are commonly needed when developing on Apple's platforms.

The library currently proposes a few low-level dependencies to interface with:
- `Application`, an abstraction over `UIApplication.shared`;
Expand Down Expand Up @@ -74,7 +74,7 @@ In each module you need access to these dependencies, add:
We present here a few of the dependencies currently shipping with the library.
If you're more interested in experimental abstractions like `AppStorage` or typed `Notification`, you can directly jump to the [Higher-level dependencies](#higher-level-dependencies) section.

### `Application`
### Application

An abstraction over `UIApplication` that you can use to communicate with your app's instance.

Expand Down Expand Up @@ -104,9 +104,9 @@ func testAlternateIconIsSet() async throws -> Void {
}
```

### `BundleInfo`
### BundleInfo

This very simple dependency exposes a `BundleInfo` type that allows to simply retrieve a few `info.plist`-related fields, like the `bundleIdentifier` or the app's `version`.
This simple dependency exposes a `BundleInfo` type that allows to simply retrieve a few `info.plist`-related fields, like the `bundleIdentifier` or the app's `version`.

For example:
```swift
Expand Down Expand Up @@ -183,6 +183,7 @@ var previews: some View {
SmoothieView(model: model)
}
```

### ProcessInfo
A simple abstraction over `ProcessInfo` that allows to retrieve low-level information on the system.
```swift
Expand All @@ -193,6 +194,7 @@ if thermalState == .critical {
}
```
Because it's a dependency, you can test it very easily without having to modify your model.

### UserDefaults
An abstraction over `UserDefaults`, where you can read and save from the user preferences.
The library exposes the same types as SwiftUI's AppStorage, so you can simply store and retrieve
Expand Down

0 comments on commit c8198e1

Please sign in to comment.