Quotes App is a fully functional iOS app that lets users browse, search, and discover quotes fetched live from the Quotable API. Built entirely in SwiftUI, this project is designed as a hands-on reference for intermediate iOS developers looking to understand how real-world apps handle networking, state management, and reactive UI patterns.
The entire build journey is documented on Instagram — broken into parts that walk through building the app from scratch.
This project exists to answer a question that trips up most SwiftUI beginners: how do you wire a real API to a real UI without things falling apart?
It's a practical reference for:
- Structuring networking with the MVVM pattern in SwiftUI
- Using
@ObservedObject,@Published, and@StateObjectcorrectly (and understanding the difference) - Handling loading, success, and error states cleanly
- Building a production-quality SwiftUI app end-to-end
Target audience: Intermediate iOS developers who know SwiftUI basics and want to level up with real networking patterns.
| Layer | Technology |
|---|---|
| Language | Swift 5.7+ |
| UI Framework | SwiftUI |
| Architecture | MVVM |
| Networking | URLSession + async/await |
| Data | Quotable Free API |
| Dependency Manager | CocoaPods |
| Build Tool | Xcode 14+ |
MVVM Architecture — ViewModels own the networking and state logic; Views stay declarative and dumb. A clean separation that scales well.
@StateObject vs @ObservedObject — when to own a ViewModel vs reference one. This project demonstrates both in context so the distinction is obvious in practice.
@Published + ObservableObject — driving UI updates reactively from network responses without manual DispatchQueue.main wrangling.
REST Networking in SwiftUI — fetching, decoding, and propagating Codable JSON responses from the Quotable API into live SwiftUI views.
Loading & Error States — handling the full request lifecycle (loading spinner → success → error) in a reusable, composable way.
Quotes-App/
│
├── Quotes.xcworkspace ← Open this in Xcode (CocoaPods workspace)
├── Quotes.xcodeproj/ ← Xcode project file
│
├── Quotes/ ← Main source directory
│ ├── App/
│ │ └── QuotesApp.swift ← App entry point
│ │
│ ├── Views/ ← SwiftUI screens & components
│ │ ├── HomeView.swift
│ │ ├── QuoteCardView.swift
│ │ └── ...
│ │
│ ├── ViewModels/ ← ObservableObject ViewModels
│ │ └── QuotesViewModel.swift
│ │
│ ├── Models/ ← Codable data models
│ │ └── Quote.swift
│ │
│ ├── Networking/ ← API service layer
│ │ └── QuotesService.swift
│ │
│ └── Resources/
│ └── Assets.xcassets
│
├── Podfile ← CocoaPods dependency file
├── Podfile.lock
├── .gitignore
└── README.md
Note: The inner source structure above reflects standard SwiftUI MVVM conventions. Explore the
Quotes/directory on GitHub for the exact file layout.
- Xcode 14+
- iOS 15+ deployment target
- CocoaPods installed (
sudo gem install cocoapods)
# 1. Clone the repository
git clone https://github.com/dheerajghub/Quotes-App.git
cd Quotes-App
# 2. Install CocoaPods dependencies
pod install
# 3. Open the workspace (not the .xcodeproj)
open Quotes.xcworkspace- Select a simulator or connected device
- Hit Cmd + R to build and run
⚠️ Make sure to openQuotes.xcworkspace— notQuotes.xcodeproj— after runningpod install.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If this project helped you understand SwiftUI networking, a ⭐️ means a lot!
For questions or issues, reach out at dheerajsh123456@gmail.com
















