Welcome to SNAP, a set of packages I use to build iOS Apps. They contain shared code, generic implementations of common features, and a template to kickstart a new project.
Disclaimer: Most packages are focussed on my own needs. They are public for you to get inspired, learn and tell me what I am doing wrong (srsly, pls tell me!).
SNAP contains a few packages in varying sizes and complexities. Some depend on each other, while others are independent. In the end they are all pieces of the snap-app-template.
The key package of the SNAP Template is SnapTheme, which provides an abstraction layer to UI configuration and styling.
To explore SNAP, just check out the example Apps listed below.
You need rules to break them, so I made up some of my own: conventions.
Packages are setup as described in package-template.md.
flowchart TD
subgraph Packages
C1[foundation]
C2[core]
M2(theme)
M3(settings-service)
M4(navigation)
M5(dependencies)
M6(swift-data)
M1(template)
end
A1{Template}
subgraph Apps
A2{Theme Demo}
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
The snap-foundation package contains basic general purpose extensions of Swift and Foundation.
The snap-core package contains common extensions for Swift and SwiftUI types, useful helper implementations, convenience definitions and workarounds.
The snap-theme package provides a toolset to abstract Colors, Fonts, Icons and Numbers of a multi-platform SwiftUI app. Define semantic attributes in a Theme and apply them to your views for a consistent UI with maintainability in mind.
A reference and demo app is available at: snap-app-theme-demo
The snap-settings-service is a simple wrapper to handle different types of settings. It stores a Codable
type for a String
key, either locally (UserDefaults), synced (NSUbiquitousKeyValueStore) or in a custom store.
The snap-navigation package defines the apps screens and navigation structure. The SnapNavigationView displays and manages the screens in a TabView.
The snap-swift-data package extends SwiftData to better interoperate with CoreData and Persistent History Tracking.
The snap-template package contains shared code to use with the snap-app-template.
snap-app-template is an Xcode project with a base setup of the SNAP package suite. The app comes with structure, navigation and infrastructure prepared, to quickly setup a new app using the SNAP packages. The snap-template package contains shared code to use with the snap-app-template.
snap-app-theme-demo is an example app project to showcase the SNAP suite. It uses the SnapAppTemplate and showcases features of the SnapTheme
package. It contains a reference of attributes and defaults of the Theme
and a catalog of adjustments to explore design changes.