A lightweight iOS application built using Swift, MVVM architecture, and CoreData for offline persistence. This app simulates a basic news panel experience with role-based access (Author/Reviewer) and sync-first data fetching.
Features
- All articles are stored in CoreData for full offline functionality.
- App prompts to sync if no data exists.
- Fetches all article IDs and details (mock API).
- Compares and merges local vs server data based on version.
- Saves updated data locally and pushes back to server.
-
- Grouped by Author name.
- Supports pagination (5 articles at a time).
- Checkbox to select articles.
- "Mark Approve" button to append current user to the
approvedBylist.
- Displays author’s own articles.
- Shows short description and approval count.
- Auto-syncs data on network reconnect.
- Displays toast messages on network changes.
- Language: Swift 5
- UI: UIKit + Storyboards + XIBs
- Architecture: MVVM
- Database: CoreData
- Networking: Mock API simulation using closure + delay
- Connectivity Monitoring:
NWPathMonitor - Toast Alerts: Simple in-view
UILabelfade animation
Simulated via:
fetchArticleIDs()– returns a list of IDsfetchArticle(by:)– returns full article dataupdateArticles(_:)– prints the updated data to console
- Launch app
- Auto Sync when launching the app
- Click "Sync" to simulate data fetch
- Login as either Author (
Robert) or Reviewer - Explore articles and approve them as needed
- Use network toggling to observe auto-sync and toast alerts


