# nmdias/DefaultsKit

Simple, Strongly Typed UserDefaults for iOS, macOS and tvOS

Repository: https://github.com/nmdias/DefaultsKit
Canonical: https://ross.abutalabs.com/products/defaultskit
Language: Swift
License: MIT
License Family: permissive
Topics: swift, swift4, swift-framework, userdefaults, ios, tvos, macos
Last push: 2024-11-18T20:23:10+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 40, longevity 100
- inputs: {"age_days": 3301, "days_push": 653, "days_rel": 654, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1440, forks 91 (observed 2026-08-28T04:04:44.185810+00:00)

## What it is
DefaultsKit is a lightweight Swift library providing a strongly typed, Codable-based wrapper around UserDefaults for iOS, macOS, and tvOS. It lets developers store and retrieve values, including complex Codable objects, using type-safe keys in under 100 lines of code.

## Use cases
- store user preferences with type-safe keys in swift
- persist codable structs to userdefaults
- save and read settings on ios and macos apps
- avoid stringly-typed userdefaults keys
- check if a defaults key exists without deserializing
- wrap userdefaults for tvos apps

## When to choose
- you want a minimal, strongly typed UserDefaults wrapper in Swift
- you need to persist Codable structs or classes to user defaults
- you prefer lightweight libraries with few dependencies

## When to avoid
- you need large-scale persistence like a database or file storage
- you want reactive/observable preference bindings
- you target platforms outside Apple's ecosystem

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: developer-tools, mobile-development, cross-platform
- platform: -
- tags: userdefaults, codable, key-value-storage, swift-package, preferences, ios, macos, swift

## Member repositories
- nmdias/DefaultsKit (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.185810+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:32.525815+00:00, confidence not recorded.
  - readme: https://github.com/nmdias/DefaultsKit (fetched 2026-08-28T04:04:44.185810+00:00, sha d19390584e2e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
