455df18dadc18a44a733f2fe9d724dec017a7dda
Two bugs were causing chapters to disappear on every relaunch: 1. seedTextbookData used `try? context.save()` (swallowing errors) and returned `inserted > 0`, so a failed save still reported success. Callers then bumped UserDefaults textbookDataVersion and subsequent launches skipped the re-seed entirely — with no rows on disk. 2. refreshTextbookDataIfNeeded wiped chapters via the batch-delete API `context.delete(model: TextbookChapter.self)`, which hits the store directly without clearing the context's .unique-id index. Re-inserting chapters with the same ids could then throw a unique-constraint error on save — also silently eaten by `try?`. Fixes: - seedTextbookData now uses do/catch around save(), returns false on error, and verifies persistence via fetchCount before returning true. - refreshTextbookDataIfNeeded fetches and deletes chapters individually so the context tracks the deletion cleanly; wipe save is also now checked and bails early on failure. - Bumped textbookDataVersion to 11 so devices poisoned by the previous silent-failure path retry on next launch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Conjuga
A Spanish verb conjugation learning app for iOS. Practice all 20 tenses with spaced repetition, handwriting recognition, and vocabulary courses.
Features
- Conjugation Practice — Flashcards, typing, multiple choice, handwriting, sentence building, and full table modes
- Spaced Repetition — SM-2 algorithm tracks what you know and surfaces what you don't
- 1,750 Verbs — From basic to expert, with irregular form highlighting
- 20 Tenses — Every indicative, subjunctive, conditional, and imperative tense
- Grammar Guide — 20 tense guides with conjugation tables + 20 grammar topic notes (Ser vs Estar, Por vs Para, etc.)
- Vocabulary Courses — Weekly decks with example sentences
- Progress Tracking — Streaks, daily goals, accuracy stats, and achievement badges
- CloudKit Sync — Review progress syncs across devices
- Widgets — Daily progress, word of the day, and weekly stats
- Text-to-Speech — Hear any verb pronounced in Spanish
Architecture
- SwiftUI + SwiftData with a dual-store configuration:
- Local store — Reference data (verbs, forms, guides) seeded from JSON on first launch
- Cloud store — User data (review cards, progress, streaks) synced via CloudKit
- SharedModels package shared between the app and widget extension
Requirements
- iOS 18+
- Xcode 16+
Building
Open Conjuga/Conjuga.xcodeproj in Xcode and run on a simulator or device. Data seeds automatically on first launch.
Description
Languages
Swift
85.5%
Python
11.9%
HTML
2.4%
Shell
0.2%