Copyright (c) 2023, Greg PFISTER. MIT License
A collection of storage tools for SwiftUI apps.
This is a collection of storage tools for SwiftUI apps. It provides:
- memory and persistent cache (documentation)
- user defaults (documentation)
- keychain (documentation)
They are all packaged as property wrappers, designed to be used in views
(similar to @State
) or view models (similar to @Published
). Each storage entry
is defined as object keys (similar to @Environment
), reducing the risk of bugs
when misspelling the storage entry key.
First, add the Swift package to your Xcode project (File -> Add Packages...):
https://github.com/gpfister/gp-swift-storage-kit
.
Then, add the library GPStorageKit
to your target dependencies.
Finally, import GPStorageKit
in your source files:
import GPStorageKit
An example iOS app gp-swift-storage-kit-test
can be found in
here.
Contributions are welcome, please refer to these contributions guidelines.
Provided under the MIT License.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.