Hello everyone 👋. Forecastly is a test project showcasing a SwiftUI weather application.
- The app displays today's weather and a 7-day forecast, showing current temperature, conditions, and location along with daily high/low forecasts.
- The weather is fetched based on the user's current location. Location permission is requested at launch, and all authorization states are handled with appropriate feedback.
- The forecast is downloaded using Swift Concurrency (async/await).
- The app uses the MVVM pattern for clear separation of concerns
Forecastly uses the OpenMeteo API to fetch real-time weather data and forecasts. It provides detailed weather information such as current conditions, hourly updates, and 7-day forecasts, all in an easy-to-use JSON format — no API key required.
- SwiftUI: For building the app’s user interface.
- MVVM Architecture: For clear separation of concerns and maintainable code.
- Swift Concurrency (async/await): For handling asynchronous network calls and data processing.
- @Observable / Swift’s New Observation Model: For state management across the app.
- Core Location: For obtaining the user’s current location and reverse‑geocoding.
- Open‑Meteo API: To fetch real‑time weather data (daily, hourly, and current conditions).

- When the user opens the app, he needs to grant location access.
- If the user has not enabled location access, he will be redirected to a view with instructions on how to do so; this view also includes a button to open the settings.
- An error message appears in case if there was an error while fetching the forecast.
- The HomeView has a navigation bar with two buttons (“info button” and “expand button”) and a sheet view displaying a detailed forecast.
- You can expand the sheet either by using a drag gesture or by tapping the “expand button” in the top right corner.
- You can view all of the forecast information by scrolling through the sheet.
- Tapping the “info button” brings up the Overview screen, which contains links and information about the project and API.
- The
@Observable
mechanism works only with iOS 17, so ensure that the minimum deployment target is set to iOS 17. - When you launch the app, you might see the following warning in the console:
"CoreSVG has logged an error. Set environment variable 'CORESVG_VERBOSE' to learn more."
This warning is not critical because I have applied.symbolRenderingMode(.multicolor)
on system images, but not all of them support multicolor mode.