Complete technical documentation: See
docs/modules/Feature.Settings.md in the project.What’s new in v2.2
SettingsView.swiftis a ≤ 125-line composition root. Every section lives in its own file underViews/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.borderedfor 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/andSwiftAIBoilerplatePro/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
Appearance
Appearance
Theme Selection (
SettingsDTO.Theme):- System (follows iOS)
- Light (always light)
- Dark (always dark)
- Aurora (premium light theme)
- Obsidian (premium dark theme)
isPremium.Privacy & Diagnostics
Privacy & Diagnostics
User Controls:
- Share diagnostics (opt-in crash/usage reporting)
Account & Subscription
Account & Subscription
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)
Legal
Legal
Links:
- Privacy Policy
- Terms of Service
- Subscription Terms
- App version display
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/SettingsRepositorypersistence - Auth - Sign in / sign out
- Payments - Subscription management
- DesignSystem - UI components,
DSColors - Localization -
AppError.localizedUserMessage,L10nstrings
Used By
- Main App - Settings tab
- All features - Theme observation
- Profile - Subscription status
Best Practices
Settings Persistence
Settings Persistence
- Save immediately on change
- Use repository pattern
- Handle errors gracefully
- Provide feedback
Paywall UX
Paywall UX
- Make it beautiful
- Highlight value
- Easy to dismiss
- Test purchase flow
Privacy
Privacy
- 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.mdSee 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 (oneBoilerplate.xctestplan run).
Tests include:
- Settings persistence
- Theme switching
- Paywall display
- Purchase flows
- Error handling
