https://github.com/sentryco/persistencekit
Persistence check for iOS / macOS
https://github.com/sentryco/persistencekit
Last synced: 3 months ago
JSON representation
Persistence check for iOS / macOS
- Host: GitHub
- URL: https://github.com/sentryco/persistencekit
- Owner: sentryco
- License: mit
- Created: 2024-11-01T17:36:15.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-25T01:12:35.000Z (6 months ago)
- Last Synced: 2025-01-16T14:55:50.967Z (4 months ago)
- Language: Swift
- Size: 19.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/sentryco/PersistenceKit/actions/workflows/Tests.yml)
[](https://codebeat.co/projects/github-com-sentryco-persistencekit-main)# PersistenceKit
> Persistence check for iOS / macOS
## Description
Detects whether the app is a fresh install or a reinstall, which can influence authentication flows and user data management. Handles nuances of persistence across iOS and macOS.## Features
- Assert database existence
- Assert keychain key existence
- Assert userdefault existence
- Reset userdefault and keychain## Example
```swift
Persistence.hasAppBeenDeleted(dbFilePath: "", privKeyName: "")
Persistence.isNewInstall(dbFilePath: "", privKeyName: "")
Persistence.reset()
```## Install
```swift
.package(url: "https://github.com/sentryco/PersistenceKit")
```## Todo
- Add dependency list to readme
- Use smaller Keychain lib, from telemetry etc