A native iPhone app (SwiftUI, SwiftData, iOS 26) for a freelancer’s expense receipts.
Requirements: a Mac with Xcode 26 (iOS 26 SDK). No dependencies, no package resolution.
open MyExpenseReports.xcodeproj
Pick an iPhone simulator (e.g. iPhone 17) and press ⌘R. Or from the terminal:
xcodebuild -project MyExpenseReports.xcodeproj -scheme MyExpenseReports -destination 'platform=iOS Simulator,name=iPhone 17' build
Run the unit tests (money parsing, CSV, API payload parsing):
xcodebuild -project MyExpenseReports.xcodeproj -scheme MyExpenseReports -destination 'platform=iOS Simulator,name=iPhone 17' test
The project uses Xcode’s folder-synchronized groups, so any file added under MyExpenseReports/
or MyExpenseReportsTests/ joins the right target automatically.
The Simulator has no camera; the “Take Photo” option appears only on a device. Use “Choose from Library” (drag an image onto the Simulator window to add one to its library).
Settings (gear icon) → paste an Anthropic API key → Save. The next photo you add is sent
to api.anthropic.com once and the fields fill in; you confirm and save. Remove the key
at any time; existing expenses are untouched.
MyExpenseReports/
App/ MyExpenseReportsApp.swift entry point, SwiftData container
Models/ Expense.swift @Model, Decimal money, external-storage image
ExpenseCategory.swift fixed category list, symbols, colors
Services/ ReceiptExtractor.swift Anthropic Messages API (vision + JSON schema)
KeychainStore.swift API key storage
CSVExporter.swift RFC 4180 CSV, locale-aware separator
Views/ ExpenseListView.swift month-grouped list, add flow, toolbar
ExpenseRow.swift row + month header
ExpenseFormView.swift create/edit, extraction states, receipt viewer
CameraPicker.swift UIImagePickerController wrapper
SettingsView.swift key entry, model info
ExportView.swift per-month ShareLink
Support/ Money.swift, MonthFormatting.swift
MyExpenseReportsTests/ Swift Testing unit tests
DECISIONS.md every choice made without asking
PRODUCT.md, DESIGN.md, .impeccable/ design context (Impeccable)