qmetrics.net

Defaults

Type-safe Swift wrapper for persistent UserDefaults storage

Frameworks & PlatformsDesktop/CLI app
Defaults screenshot

A Swift package that wraps UserDefaults with typed keys, default values, and optional iCloud sync. It suits app storage across Apple platforms and SwiftUI.

Overview

Defaults is a Swift package that stores key-value pairs across app launches on top of the system UserDefaults API. It offers a type-safe facade so you declare keys with types and defaults in one place instead of scattering string keys and fallback values.

You access values through a typed subscript and can observe key changes with async streams or callbacks. SwiftUI integration uses property wrappers that refresh views when stored values change, and a Toggle helper binds to boolean keys. Data is stored as JSON-serialized values for easier debugging.

The package supports many built-in types including Codable and NSSecureCoding, and you can add custom types through serialization protocols and bridges. An iCloud module can synchronize values across devices.

Install it as a Swift Package Manager dependency in Xcode. It targets macOS, iOS, tvOS, watchOS, and visionOS according to the compatibility notes in the source material.

Key features

  • Strongly typed keys with centralized defaults
  • SwiftUI property wrappers and Toggle
  • Change observation via async streams
  • JSON-serialized storage for debugging
  • Codable and NSSecureCoding support
  • Custom type bridges and serialization
  • Optional iCloud cross-device sync
  • Usable outside SwiftUI views

Use cases

  • App preference and settings storage
  • SwiftUI state backed by persistence
  • Shared typed keys across app modules
  • Custom Codable types in UserDefaults
  • Multi-device settings via iCloud

Tags

Similar software

ECC

Open-source agent engineering toolkit for coding harnesses

ECC adds planning, verification, review, memory, skills, and security scanning to coding agents such as Claude Code, Codex, and Cursor. It installs as plugins, packages, and managed adapters across multiple harnesses.

★ 311.7k⟳ 8 days agoMIT
Frameworks & PlatformsDesktop/CLI app

React

JavaScript library for web and native user interfaces

React helps developers build interfaces from reusable components that manage their own state. Views update declaratively when underlying data changes.

★ 253k⟳ 2 days agoMIT
Frameworks & PlatformsDesktop/CLI app

Flutter

Open-source UI framework for multi-platform apps from one codebase

Flutter is an SDK for building user experiences for mobile, web, and desktop from a single codebase. It uses the Dart language and compiles to native machine code or web targets.

★ 181.5k⟳ todayBSD-3-Clause
Open Source Alternative to:Ionic Enterprise

Bootstrap

Responsive HTML, CSS, and JavaScript front-end toolkit

Bootstrap supplies CSS, JavaScript, and Sass-based styles for building responsive, mobile-first sites. It ships prebuilt grid layouts, UI components, and optional JavaScript plugins.

★ 175.1k⟳ 2 days agoMIT

Langflow

Visual low-code builder for AI agents and workflows

Langflow is a visual builder for AI agents and workflows. Flows can be customized in Python and deployed as an API or as an MCP server, with support for major LLMs and vector databases.

★ 157k⟳ todayMIT
Open Source Alternative to:Relevance AIVoiceflow

LangChain

Framework for agents and LLM-powered applications

LangChain helps developers chain interoperable components and integrations to build agents and LLM-powered applications. It offers a standard interface for models, embeddings, vector stores, and related pieces.

★ 150.1k⟳ 2 days agoMIT