A simple iOS application that allows users to search and filter countries by name or capital in real-time.
- Search for countries by name or capital
- Real-time search results
- Table view layout using
UITableView - Loading state indicator during filtering
- Error handling and empty state
- Unit tests and UI tests included
- iOS 18.0+
- Xcode 15.0+
- Swift 5.9+
- Clone the repository
- Open
Assesment_wlmrt.xcodeprojin Xcode - Build and run the project
The project follows the MVVM (Model-View-ViewModel) architecture pattern and uses UIKit for the user interface. It's organized into the following components:
- Models: Data models for countries (
name,region,code,capital) - Views / ViewControllers: UIKit-based UI layout (
UITableView, custom cells) - ViewModels: Business logic and filtering
- Services: Network layer for fetching countries via
CountriesServiceProtocol
The project includes unit tests and UI tests for the core functionality.
To run the tests:
- Open the project in Xcode
- Select the test target
- Press
Cmd + Uor navigate to Product > Test
