A teaching-oriented iOS app that demonstrates various architectural pattens
Pick the branch that matches your tutorial and review the starting and ending commits for every YouTube session. Visit https://www.swiftpattern.com for more.
- Swift questions loaded from
Resources/questions.json - MVVM separation (Views / ViewModels / Services)
- Settings (UserDefaults): time limit (mins), enable/disable timing, show hint after wrong answer, randomize order
- Per-question timer (optional) — auto-marks wrong on expiry
- Help sheet with theory (no spoilers)
- Analytics: Last Session / Week / Month with accuracy trend
- Xcode 14+
- iOS 16+
- Swift 5.7+
- Clone the repo and open the project in Xcode.
- Ensure
Resources/questions.jsonis included in Build Phases → Copy Bundle Resources. - Build & run on iOS 16+.
Edit Resources/questions.json (array of Question objects):
{
"id": 1,
"questionText": "…",
"infoMarkdown": "…",
"options": ["A","B","C","D"],
"correctIndex": 1,
"helpPromptMarkdown": "…"
}StatisticsServiceis not anObservableObject; inject it explicitly where needed (e.g., intoMainTabViewandAnalyticsReportView), or wrap in a customEnvironmentKeyif preferred.- The app programmatically switches to Analytics on completion and silently resets the quiz to question 1 for the next run.
MIT