English · Türkçe · 简体中文 · 日本語 · 한국어 · Español · Deutsch · Français · Português (Brasil) · Русский
Twenty-one SwiftUI app templates for iOS 18, from e-commerce and finance to messaging and travel.
Each template is a standalone Swift package with a tab-based app, sample data and tests.
Add one to an app project in Xcode to see it run, or copy it under your own name with
create-ios-app and build your app from there.
The templates are starting points, not finished products. Twenty of them run on in-memory sample data and give you a working tab structure, navigation and a tested store that you can wire to your own services. The Clean Architecture template goes one step further: Domain, Data and Presentation targets, an HTTP layer with an in-process sample server, and an offline cache.
- Twenty app types: AI assistant, booking, creator video, CRM, e-commerce, education, finance, fitness, food delivery, marketplace, messaging, music and podcasts, news, notes, privacy vault, productivity, social media, subscriptions, team collaboration and travel.
- A layered reference app:
CleanArchitectureAppis a team directory whose layers are separate targets, so the compiler enforces the dependency rule. It loads people over HTTP, falls back to a saved copy offline and checks roles and permissions in use cases, with 108 tests across the four targets and UI tests that include an accessibility audit. - A tested store per app: state and actions live in a
@MainActorstore with a Swift Testing suite, so the screens stay thin and the behaviour is checked without UI. - No third-party dependencies: the templates use SwiftUI and Foundation only, and run without an account, an API key or network access.
- Your own name:
create-ios-apprenames the package, module, types, host project and bundle identifier, and refuses names that would clash with names in the template. - Light and dark: every template has screenshots of both appearances, taken in the simulator by a script in this repository.
1. Get the templates
git clone https://github.com/muhittincamdali/iOSAppTemplates.git2. Add a template to your app
In Xcode, create an app with File › New › Project… › iOS › App (or open your own app; its
deployment target must be iOS 18 or later). Choose File › Add Package Dependencies…, click
Add Local…, select the folder iOSAppTemplates/Templates/EcommerceApp and click
Add Package. Add the EcommerceApp library to your app target.
3. Start it
Replace the contents of the file that contains @main (in a new project, the one named after
your app, such as MyAppApp.swift) with:
import EcommerceApp
@main
enum QuickStartApp {
static func main() {
EcommerceAppShell.main()
}
}Choose an iPhone simulator and press Run (⌘R). The Shop tab of the E-commerce template appears. The finished project is in Examples/QuickStart.
Add a folder from Templates/ to your app as a local package, as in the quick start, or create
a renamed copy with create-ios-app (see Usage). The templates are not published as
remote packages, because each one is meant to be copied and changed.
Run the tool from a clone with swift run create-ios-app, or build it once and run the binary:
swift build -c release
.build/release/create-ios-app listThe logic behind create-ios-app is the TemplateScaffold library (macOS 14 or later). It is
included in every release from 3.0.0 on:
dependencies: [
.package(url: "https://github.com/muhittincamdali/iOSAppTemplates.git", from: "3.0.0")
],
targets: [
.executableTarget(name: "YourTool", dependencies: [
.product(name: "TemplateScaffold", package: "iOSAppTemplates")
])
]--template |
Template | Tabs |
|---|---|---|
ai-assistant |
AI Assistant | Workspace, Presets, Memory, Tools, Trust |
booking |
Booking & Reservations | Home, Calendar, Guests, Requests, Profile |
clean-architecture |
Clean Architecture | Directory, Summary, Settings |
creator-video |
Creator Short Video | Studio, Pipeline, Analytics, Moderation, Profile |
crm |
CRM Admin | Pipeline, Accounts, Renewals, Tasks, Profile |
ecommerce |
E-commerce | Shop, Browse, Cart, Orders, Profile |
education |
Education | Home, Courses, Lessons, Assessments, Progress |
finance |
Personal Finance | Overview, Accounts, Budgets, Activity, Insights |
fitness |
Fitness | Plan, Session, Progress, Recovery, Profile |
food-delivery |
Food Delivery | Home, Browse, Cart, Orders, Profile |
marketplace |
Marketplace | Home, Browse, Seller, Orders, Trust |
messaging |
Messaging | Inbox, Rooms, Safety, Profile |
music-podcast |
Music & Podcasts | Library, Queue, Downloads, Discover, Profile |
news-blog |
News & Blog | Today, Sections, Saved, Digest, Profile |
notes |
Notes & Knowledge | Capture, Library, Links, Spaces, Profile |
privacy-vault |
Privacy Vault | Vault, Alerts, Recovery, Audit, Profile |
productivity |
Productivity | Dashboard, Inbox, Projects, Focus, Review |
social |
Social Media | Feed, Explore, Create, Notifications, Profile |
subscription-lifestyle |
Subscription Lifestyle | Dashboard, Programs, Streaks, Plans, Profile |
team-collaboration |
Team Collaboration | Workspace, Tasks, Decisions, Handoffs, Profile |
travel |
Travel Planner | Trips, Timeline, Bookings, Essentials, Profile |
SocialMediaApp also shows how to put a boundary in front of an identity provider: sign-in goes
through an AuthService protocol, and the bundled LocalAuthService keeps accounts in memory
with a demo account (demo@example.com / password123).
CleanArchitectureApp shows how to connect a real backend: replace its in-process sample
server with URLSessionHTTPClient and your base URL. The
Working with the Clean Architecture Template
guide explains where new code goes.
cd iOSAppTemplates
swift run create-ios-app list
swift run create-ios-app new MyShop --template ecommerce --output ~/DeveloperThe tool copies Templates/EcommerceApp to ~/Developer/MyShop and renames the package,
module, test target, EcommerceAppShell, host project and bundle identifier to use MyShop.
Names must be Swift identifiers that start with an ASCII letter. The tool refuses to overwrite
an existing directory and refuses names that would turn into a name the template already uses,
such as CommerceStore for the E-commerce template.
Add ~/Developer/MyShop to your app as in the quick start (import MyShop,
MyShopShell.main()), or test it and open its host project:
cd ~/Developer/MyShop
xcodebuild test -scheme MyShop -destination 'platform=iOS Simulator,name=iPhone 17'
cd App
xcodegen generate
open MyShop.xcodeprojiPhone 17 is an example; use any simulator that xcrun simctl list devices available lists.
The host project needs XcodeGen
(brew install xcodegen).
Open Templates/<Name>/Package.swift in Xcode to edit the template and run its tests, or
generate its host project from Templates/<Name>/App with xcodegen generate.
TemplateScaffold needs a checkout of this repository, because the templates are read from
Templates/:
import Foundation
import TemplateScaffold
func makeShop(templates: URL, output: URL) throws -> ScaffoldResult {
guard let template = TemplateCatalog.template(named: "ecommerce") else {
throw CocoaError(.fileNoSuchFile)
}
let name = try ProjectName("MyShop")
return try Scaffolder(templatesDirectory: templates).scaffold(template, as: name, in: output)
}This snippet is compiled and run by the test suite.
The first screen of every template, light and dark versions in docs/images:
| AI Assistant | Booking & Reservations | Creator Short Video | CRM Admin | E-commerce |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Education | Personal Finance | Fitness | Food Delivery | Marketplace |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Messaging | Music & Podcasts | News & Blog | Notes & Knowledge | Privacy Vault |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Productivity | Social Media | Subscription Lifestyle | Team Collaboration | Travel Planner |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Clean Architecture | Clean Architecture, dark |
|---|---|
![]() |
![]() |
Screenshots are taken on an iPhone 17 Pro simulator by scripts/capture-screenshots.sh. To run a template yourself, open Examples/QuickStart in Xcode and press Run.
Reference documentation and articles:
- TemplateScaffold on GitHub Pages: the API of the scaffolding library and the articles below.
- Each template has a README in its folder, for example Templates/EcommerceApp, that lists its screens, store and tests.
To build the documentation locally:
swift package generate-documentation --target TemplateScaffold- Getting Started: create a
project with
create-ios-app, run its tests and open it in Xcode. - Adding a Template to an App: the quick start in detail, and what to change next.
- How Renaming Works: which names change, which do not, and which names are refused.
- Working with the Clean Architecture Template: the dependency rule, adding a feature layer by layer, and connecting your own server.
- Examples: the QuickStart app.
| Platform | Minimum version |
|---|---|
| iOS (templates) | 18.0 |
| macOS (create-ios-app, TemplateScaffold) | 14.0 |
| Toolchain | Swift 6.0 (tools version) |
The code is built and tested with Xcode 27.0 (Swift 6.4); CI uses the default Xcode of GitHub's
macos-26 image. XcodeGen is needed only for the host projects in Templates/<Name>/App.
Package.swift create-ios-app + TemplateScaffold (macOS)
Sources/CLI/ argument parsing (swift-argument-parser)
Sources/TemplateScaffold/ catalog, name validation, renaming, copying
Tests/TemplateScaffoldTests/ Swift Testing, including a scaffold of every template
Templates/<Name>/ 21 independent iOS 18 packages with tests and an App/ host
Examples/QuickStart/ an app project that runs a template as a local package
scripts/ test-templates.sh, capture-screenshots.sh
Each template contains:
Sources/<Name>/: the public<Name>Shellapp scene, the screens, and a@MainActorObservableObjectstore that owns the sample data and every action the screens trigger (cart totals, order and booking state transitions, approval queues and so on). Most templates keep this in<Name>.swift;EcommerceApp,FitnessAppandSocialMediaAppsplit the store, the models and the screens into separate files.Tests/<Name>Tests/: a Swift Testing suite for that store, covering derived values, state transitions, guard clauses for invalid input and unknown identifiers, and limits that must not be exceeded.App/: an XcodeGen spec and a host file that calls<Name>Shell.main().
CleanArchitectureApp replaces the single store with four targets:
CleanArchitectureAppDomain (entities, rules, use cases), CleanArchitectureAppData (HTTP,
JSON, cache, repository), CleanArchitectureAppPresentation (@Observable models and screens)
and CleanArchitectureApp, the composition root, each with its own test target.
The templates do not depend on the root package or on each other. Renaming is a text
substitution of the template's directory name, which is why every name that has to change
starts with it (EcommerceApp, EcommerceAppShell, EcommerceAppTests).
- List the package on the Swift Package Index.
- Replace the remaining string-typed states with enums, such as the order headline in
EcommerceApp, the containment status inMessagingAppand the preset mode inAIAssistantApp. - Split the templates that still keep most of their code in
<Name>.swiftinto store, model and screen files, asEcommerceApp,FitnessAppandSocialMediaAppalready do.
Contributions are welcome. Read the contributing guide and the code of conduct before opening a pull request. Report security issues privately as described in the security policy. Changes are recorded in CHANGELOG.md.
swift test # scaffolding library and CLI
scripts/test-templates.sh # all templates in the iOS Simulator
scripts/test-templates.sh EcommerceApp # one template
scripts/capture-screenshots.sh # refresh docs/imagesReleased under the MIT license. See LICENSE.





















