SNAP is a set of Swift packages I use to build iOS apps. This repository is the overview for the suite; the packages live in their own repositories.
The packages contain shared code, reusable implementations of common app features, and a template for starting a new app. They are public for reference and feedback, but they are mainly shaped around my own projects.
- snap-template contains shared app code and the demo project that shows the suite in use.
- snap-style abstracts semantic colors, fonts, icons and numbers for SwiftUI apps.
- Other packages cover foundation extensions, SwiftUI helpers, settings storage, navigation, dependency injection and SwiftData/CoreData interop.
You need rules to break them, so I made up some of my own: conventions.
Packages are set up as described in package-template.md.
flowchart TD
subgraph Snap-Packages
C1[snap-foundation]
C2[snap-core]
M2(snap-style)
M3(snap-settings-service)
M4(snap-navigation)
M5(snap-dependencies)
M6(snap-swift-data)
M1(snap-template)
end
A1{SnapTemplateDemo}
subgraph Apps
A3{... App}
end
C1 --> C2
C1 --> M4
C1 --> M5
C2 --> M2
C2 --> M3
M2 --> M1
M3 --> M1
M4 --> M1
M5 --> M1
M1 --> A1
A1 -.->|Copy| Apps
M6 --> Apps
snap-foundation contains basic extensions for Swift and Foundation.
snap-core contains Swift, SwiftUI and UIKit extensions, helper implementations, convenience definitions and workarounds.
snap-style abstracts colors, fonts, icons and numbers for multi-platform SwiftUI apps. Define semantic attributes in a theme and apply them in views.
snap-settings-service stores Codable values for String keys in UserDefaults, NSUbiquitousKeyValueStore, or a custom store.
snap-navigation defines SwiftUI navigation structure separately from presentation. It supports selectable destinations, stack pushes, modal presentation, deeplinks and multiple presentation styles.
snap-dependencies provides a dependency injection container based on Dependencies key paths and a @Dependency property wrapper.
snap-swift-data improves interoperability between SwiftData, CoreData objects, and Persistent History Tracking.
snap-template contains shared code and a demo Xcode project for using SNAP in an iOS app. The demo includes prepared app structure, navigation and infrastructure.
- The snap-app-template was moved as Demo project into snap-template.
- snap-matching-navigation was replaced by snap-navigation.
- snap-theme was replaced by snap-style.
Not working at the moment (2026-05)! The Generator does not build, will try again in the future.
packages.json is prepared.