Skip to content

sentryco/AppConfigKit

Repository files navigation

Tests codebeat badge License: MIT Swift 5.9 Platforms: iOS/macOS

AppConfigKit

Easily retain or reset app config

Description

App Configuration Management. Allows configuration of app settings related to user data and feature visibility, supporting different modes such as debugging and production. Includes options to reset user data for testing or retain data for production use. AppConfigKit is a great way to reset the app before UITests based on Process info passed from the UITest. Or retain app data when needed.

Features

  • Reset UserDefaults
  • Reset database data (SwiftData)
  • Reset Keychain data

Example

AppConfig.current = .reset(db: ...)
AppConfig.current = .retain(db: ...)

Acknowledgements

AppConfigKit uses the following libraries:

Todo

  • Clean up code
  • Clean up comments
  • Max 80 chars for long descriptions
  • Potentially use keychain lib from telemetry instead of key
  • Refactor to Use Dependency Injection Issue: The code relies on static properties and methods, making it less flexible and harder to test. Improvement: Refactor the code to use dependency injection, passing dependencies through initializers or methods.

About

Easily retain or reset app config

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages