iOS App Overview
The FindU iOS app is a native SwiftUI application that helps students discover their perfect college match through an intuitive swiping interface.Current Version: 1.5+ (App Store)
- Fixed profile creation issues
- Fixed cross-account data contamination
- Added DEBUG tools for development
Architecture
The app follows the MVVM (Model-View-ViewModel) pattern with feature-based organization:Project Structure
Architecture Principles
MVVM Pattern
Key Features
Authentication System
- Providers: Apple Sign In, Google Sign In, Email
- State Management: Managed through
AuthStateenum - Supabase Integration: Handles user sessions
- Deep Linking: Support for magic links
Profile Creation Flow
Multi-step onboarding that collects:- Basic Information
- Academic Profile
- Preferences
- Location & Demographics
Swiping Interface
- Card Stack: Tinder-style interface
- Gestures: Swipe, tap, and drag support
- Real-time Learning: Algorithm adapts to swipes
- Match Details: Expandable college information
Messaging System
- Real-time Chat: WebSocket-based updates
- AI Advisor: Integrated college counselor
- Rich Messages: Support for links, images
- Notifications: Push notification support
Data Flow
State Management
Global State
Managed through singletons and environment objects:Local State
Component-specific state using@State and @StateObject:
Navigation Patterns
Tab-Based Navigation
Main app navigation uses tabs:- Home (Swiping)
- Messages
- Scholarships
- Profile
Modal Presentations
Used for:- Profile creation
- College details
- Settings
- Share sheets
Navigation Stack
Deep navigation within features:Network Layer
API Client Pattern
Error Handling
UI Components
Custom Components
SchoolCard: Swipeable card viewMatchScoreView: Visual match percentageStatTag: Information badgesMessageBubble: Chat UI elements
Design System
- Colors: Defined in Assets catalog
- Typography: Custom fonts (Plus Jakarta Sans)
- Spacing: Consistent padding system
- Animations: Spring-based transitions
Performance Optimization
Image Loading
- Lazy loading with AsyncImage
- Caching strategy
- Thumbnail optimization
Data Management
- Pagination for large lists
- Incremental loading
- Background refresh
Memory Management
- Proper use of weak references
- View recycling in lists
- Image cache limits
Testing Approach
Unit Tests
UI Tests
Debugging
Debug Helpers
- Console logging with emojis
- Network request inspection
- State change tracking
- Performance monitoring
Common Issues
-
Profile Creation (Fixed in v1.5)
- Issue: Response decoding mismatch (snake_case vs camelCase)
- Fix: Proper response handling for database fields
- Note: Database returns
num_ap_classes, code expectsnumAPClass
-
Cross-Account Data Contamination (Fixed in v1.5)
- Issue: UserDefaults persists liked/disliked schools across accounts
- Solution: Call
FeedStateManager.resetCompletely()on logout - Debug: Use DEBUG clear button in SchoolsView header
-
Build Errors (v1.5)
- Preview Errors: Wrap preview code with
#if DEBUG - Missing Sample Data: Check SmartQuestion.sampleFinancial
- Return in ViewBuilder: Remove explicit return statements
- Preview Errors: Wrap preview code with
- Authentication: Verify Supabase config
- Push Notifications: Check entitlements
- Deep Links: Verify URL schemes