- Create new configuration file from template.

- Choose "Configuration Settings File"

- Set name "Config" and check NooroWeather app target.

- Open Config file add line:
WEATHER_API_KEY = 1231231231231231231
Key name should be 'WEATHER_API_KEY' Key value should be you weather API key without any quotes.

- Now try to build. I hope it will work 🤞.
Technologies used for this task:
- SwiftUI
- Combine
- MVVM Architecture
- Dependency Injection
- Async/Await
- Swift Testing
I tried to make this demo project as simple as possible.
I used AsyncImage for images because it has some basic caching under the hood and easy to use. But in case of need to use more presise caching mechanisms better create manager which will download and save images to the file system.
I used UserDefaults for persistence because I don't want to overcomplicate demo project with SwiftData/CoreData or any other 3rd-party libraries.
I used configuration file to keep API keys, but in real-life project I would probably use on-demand resources because it's much safer to keep API keys outside the package.
Build a weather app that demonstrates your skills in Swift, SwiftUI, and clean architecture. The app should allow users to search for a city, display its weather on the home screen, and persist the selected city across launches. Follow the Figma designs closely and integrate data from WeatherAPI.com.
- Home Screen:
- Displays weather for a single saved city, including:
- City name.
- Temperature.
- Weather condition (with corresponding icon from the API).
- Humidity (%).
- UV index.
- "Feels like" temperature.
- If no city is saved, prompt the user to search.
- Search bar for querying new cities.
- Displays weather for a single saved city, including:
- Search Behavior:
- Show a search result card for the queried city.
- Tapping the result updates the Home Screen with the city’s weather and persists the selection.
- Local Storage:
- Use UserDefaults (or equivalent) to persist the selected city.
- Reload the city’s weather on app launch.
- Use WeatherAPI.com to fetch weather data:
- API Documentation: WeatherAPI Documentation.
- Free tier includes current weather data with:
- Temperature.
- Weather condition (including an icon URL).
- Humidity (%).
- UV index.
- Feels like temperature.
- Tech Stack:
- Use Swift and SwiftUI exclusively.
- Follow MVVM architecture with modular, testable code.
- Use protocol-oriented programming and dependency injection.
- API:
- Fetch weather data using WeatherAPI.com.
- Handle errors gracefully (e.g., invalid cities, no network).
- UI:
- Match the Figma designs here.
- Ensure visual consistency (95% accuracy).
- Time:
- This task should take no more than 5 hours. Please stop after 5 hours so that not only do you not overwork yourself but we get a feel for your speed.
- Send an email and provide a public GitHub repo with:
- Complete source code.
- Setup instructions in the README.
- Questions? Feel free to reach out for clarification.
- Architecture & Code Quality:
- Clean, modular, and testable code.
- Proper separation of concerns (MVVM).
- Local Storage:
- Reliable persistence of the selected city.
- Networking:
- Smooth API integration and error handling.
- UI/UX:
- Matches Figma designs and feels intuitive.
- Includes all required weather details (e.g., icons, humidity, UV index, "feels like").