# mac-cain13/R.swift

Strong typed, autocompleted resources like images, fonts and segues in Swift projects

Repository: https://github.com/mac-cain13/R.swift
Canonical: https://ross.abutalabs.com/products/rswift
Language: Swift
License: MIT
License Family: permissive
Topics: swift, ios, watchos, tvos, code-generator, autocompletion, xcode, resources
Last push: 2025-04-01T13:18:36+00:00

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

## Adoption (not part of the score)
Stars 9560, forks 776 (observed 2026-08-28T04:10:31.912624+00:00)

## What it is
R.swift is a code generation tool for Swift projects that generates strongly typed, autocompleted accessors for resources like images, fonts, colors, localized strings, storyboards, segues, and nibs. It replaces stringly-typed resource lookups with compile-time checked code, preventing runtime crashes from incorrect resource names.

## Use cases
- access iOS images and fonts with type-safe autocompletion instead of string names
- catch invalid resource name references at compile time in Swift apps
- generate typed accessors for storyboards, segues, and nibs in Xcode projects
- manage localized strings without stringly-typed NSLocalizedString calls
- avoid runtime crashes from renamed or missing assets in iOS apps

## When to choose
- you develop iOS, tvOS, or watchOS apps in Swift and want compile-time checked resource access
- your team suffers from runtime crashes due to mistyped asset or storyboard names
- you want IDE autocompletion for images, fonts, colors, and localized strings

## When to avoid
- you develop for platforms outside Apple's ecosystem (Android, web, server-side)
- you use SwiftUI exclusively with asset catalogs and don't need generated accessors
- your project is small enough that string-based resource lookup overhead is negligible

## Facets
- artifact type: library
- maturity: active
- function: developer-tools, type-system
- domain: mobile-development, developer-tools
- platform: -
- tags: swift, xcode, code-generator, autocompletion, resources, type-safety, ios, watchos, tvos, code-generation, macos

## Member repositories
- mac-cain13/R.swift (main) score 40

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:31.912624+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-29T17:21:57.166274+00:00, confidence not recorded.
  - readme: https://github.com/mac-cain13/R.swift (fetched 2026-08-28T04:10:31.912624+00:00, sha 608090be0ace)
- Data as of 2026-08-30T08:39:29.467469+00:00.
