# hyperoslo/Sugar

:coffee: Something sweet that goes great with your Cocoa

Repository: https://github.com/hyperoslo/Sugar
Canonical: https://ross.abutalabs.com/products/hyperoslo-sugar
Homepage: https://github.com/hyperoslo
Language: Swift
License: NOASSERTION
License Family: other
Topics: ios, swift, sweet, sugar
Last push: 2020-06-18T11:12:48+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4073, "days_push": 2267, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1059, forks 70 (observed 2026-08-28T04:03:25.542440+00:00)

## What it is
Sugar is a Swift library that adds convenient extensions and helpers to Cocoa and Cocoa Touch, covering app info, screen/simulator checks, keyboard observation, dates, GCD, regex, localization, method swizzling, and testing utilities. It aims to make common iOS and macOS development tasks terser and sweeter.

## Use cases
- read app bundle info like name, version, and URL schemes in Swift
- detect if code is running on the iOS simulator
- observe keyboard show/hide events easily
- compare and construct dates with less boilerplate
- run closures once and simplify GCD usage
- use regex and string helpers in Swift
- simplify unit and UI testing setup

## When to choose
- you want lightweight Swift extensions for common UIKit/Foundation tasks
- you maintain an older Swift/Cocoa codebase and want terser syntax
- you need small helpers like keyboard observation or simulator detection without a big framework

## When to avoid
- you need a actively maintained library with recent Swift concurrency support
- you prefer writing your own extensions over a dependency
- your project targets modern Swift versions beyond what Sugar supports

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools, concurrency, internationalization, testing
- domain: developer-tools, mobile-development, cross-platform
- platform: -
- tags: cocoa, swift-extensions, syntactic-sugar, uikit-helpers, foundation-helpers, ios, macos, swift

## Member repositories
- hyperoslo/Sugar (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:25.542440+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-30T06:57:14.561183+00:00, confidence not recorded.
  - readme: https://github.com/hyperoslo/Sugar (fetched 2026-08-28T04:03:25.542440+00:00, sha 453d13fa930a)
  - homepage: https://github.com/hyperoslo (fetched 2026-08-29T12:58:57.329867+00:00, sha f184e3673142)
- Data as of 2026-08-30T08:39:29.467469+00:00.
