You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ A companion library to Point-Free's [`swift-dependencies`](https://github.com/po
9
9
## On the menu
10
10
[`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.
11
11
12
-
`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.
12
+
"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.
13
13
14
14
The library currently proposes a few low-level dependencies to interface with:
15
15
-`Application`, an abstraction over `UIApplication.shared`;
@@ -74,7 +74,7 @@ In each module you need access to these dependencies, add:
74
74
We present here a few of the dependencies currently shipping with the library.
75
75
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.
76
76
77
-
### `Application`
77
+
### Application
78
78
79
79
An abstraction over `UIApplication` that you can use to communicate with your app's instance.
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`.
109
+
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`.
110
110
111
111
For example:
112
112
```swift
@@ -183,6 +183,7 @@ var previews: some View {
183
183
SmoothieView(model: model)
184
184
}
185
185
```
186
+
186
187
### ProcessInfo
187
188
A simple abstraction over `ProcessInfo` that allows to retrieve low-level information on the system.
188
189
```swift
@@ -193,6 +194,7 @@ if thermalState == .critical {
193
194
}
194
195
```
195
196
Because it's a dependency, you can test it very easily without having to modify your model.
197
+
196
198
### UserDefaults
197
199
An abstraction over `UserDefaults`, where you can read and save from the user preferences.
198
200
The library exposes the same types as SwiftUI's AppStorage, so you can simply store and retrieve
0 commit comments