Skip to main content
Complete technical documentation: See docs/modules/Feature.Settings.md in the project.

What’s new in v2.2

  • SettingsView.swift is a ≤ 125-line composition root. Every section lives in its own file under Views/Settings/*.swift (appearance, privacy, notifications, subscription, legal, AI, accessibility, about, and so on). Account sign in/out is handled in the view-model code (ViewModels/SettingsViewModel+Account.swift), not a standalone section view. The public entry point is unchanged; downstream customisations that used to edit one giant file now edit the matching section file.
  • Localized error surface. Error call sites in this module use AppError.localizedUserMessage (en + es) from the Localization package, which FeatureSettings now links directly.
  • Paywall CTAs use the standard system styles: .buttonStyle(.borderedProminent) for the primary CTA and .bordered for the secondary. If you were styling paywall buttons via .background(), switch to .tint(YourColor) on the standard styles so Liquid Glass handles the surface correctly on iOS 26.
  • Profile, EmailSignUp, and related screens in the app target were split the same way. Check the SwiftAIBoilerplatePro/AppShell/Profile/ and SwiftAIBoilerplatePro/AppShell/Auth/ subfolders if a previous customisation disappears from the top-level file.

Purpose

FeatureSettings module handles:
  • Settings UI - User preferences management
  • Paywall - Beautiful subscription screen
  • Theme Selection - 5 built-in themes
  • Privacy Controls - Diagnostics, notifications
  • Account Management - Sign out, delete account

Key Components

SettingsViewModel

Manages app-wide settings:

PaywallViewModel

Manages subscription purchases:

Settings Categories

Theme Selection (SettingsDTO.Theme):
  • System (follows iOS)
  • Light (always light)
  • Dark (always dark)
  • Aurora (premium light theme)
  • Obsidian (premium dark theme)
Changes apply instantly. Aurora and Obsidian are flagged isPremium.
User Controls:
  • Share diagnostics (opt-in crash/usage reporting)
Notification permissions live in their own Notifications section; account deletion is handled by the app-level Account flow.
Management:
  • Pro status / “Go Pro” and Restore Purchases (Subscription section)
  • Manage Subscription (App Store, from the paywall)
  • Sign in / Sign out (Auth)
  • Account deletion (app-level Account flow)

Paywall UI

Beautiful subscription screen with:
  • ✅ Feature comparison
  • ✅ Pricing display
  • ✅ Monthly and annual options
  • ✅ Clear CTAs
  • ✅ Terms and privacy links
  • ✅ Restore purchases button

Customization Examples

Add New Setting

Customize Paywall

Add Custom Theme

Paywall Best Practices

1

Clear Value

Show exactly what users get:
  • List specific features
  • Highlight most popular plan
  • Show savings (annual vs monthly)
2

Easy Purchase

  • Prominent CTAs
  • Clear pricing
  • Both monthly and annual
  • Restore purchases visible
3

Transparent Terms

  • Link to subscription terms
  • Link to privacy policy
  • Cancellation policy clear
  • Auto-renewal explained
4

Handle Errors

  • Purchase cancelled (don’t error)
  • Network failures (retry)
  • Already subscribed (show status)
  • Restore failures (help user)

Key Files

Dependencies

  • Core - Error handling, logging, theme manager
  • Storage - SettingsDTO / SettingsRepository persistence
  • Auth - Sign in / sign out
  • Payments - Subscription management
  • DesignSystem - UI components, DSColors
  • Localization - AppError.localizedUserMessage, L10n strings

Used By

  • Main App - Settings tab
  • All features - Theme observation
  • Profile - Subscription status

Best Practices

  • Save immediately on change
  • Use repository pattern
  • Handle errors gracefully
  • Provide feedback
  • Make it beautiful
  • Highlight value
  • Easy to dismiss
  • Test purchase flow
  • Opt-in for tracking
  • Clear data policies
  • Easy account deletion
  • GDPR compliance

Learn More

Full Documentation

Find complete FeatureSettings guide in your project

Payments Module

Subscription management

Design System

Theme system

Building Guide

Customize settings

Build with AI (fast)

You can customize this module in minutes using our ready-to-paste LLM prompts.

Example Prompt

Context: Packages/FeatureSettings/** Prompt: “Add a Privacy section to Settings that links to the policy page and includes a clear account-data explanation.” See all prompts → docs/prompts/Feature.Settings.prompts.md
See in project: docs/modules/Feature.Settings.md

Test Coverage

FeatureSettings has its own package test target, run as part of ~598 tests across 12 package test targets + the app test suites (one Boilerplate.xctestplan run). Tests include:
  • Settings persistence
  • Theme switching
  • Paywall display
  • Purchase flows
  • Error handling