Giter Club home page Giter Club logo

mlweather's Introduction

MLWeather ๐ŸŒฆ

Weather_Video.mp4

Overview

MLWeather is an iOS application that displays current weather information for the device location using the OpenWeatherMap API. The app is built using UIKit and follows a modular MVVM-C (Model-View-ViewModel-Coordinator) architecture to ensure maintainability and scalability. The project includes a network layer for API requests and uses CocoaPods as the dependency manager with Kingfisher for image loading.

Features

  • Display current weather details including:
    • City name
    • Weather icon
    • Current temperature
    • Weather description
    • Low and high temperatures
    • Wind speed and direction
  • Works on light and dark mode
  • Works on Portrait and Landscape
  • Works on iPhone and iPad (Also on Macbook as iPad App)

Requirements

  • iOS 17.5+
  • Xcode 15.4+
  • Swift 5.0+

Installation

  1. Clone the repository:
    git clone https://github.com/saulurias/MLWeather.git
  2. Navigate to the project directory:
    cd MLWeather
  3. Install the dependencies:
    pod install
  4. Open the project in Xcode:
    open MLWeather.xcworkspace

Usage

  1. Open the project in Xcode.
  2. Add your OpenWeatherMap API key to APIEnvironment:
    var appId: String {
        let apiKey: String
        switch self {
        case .production:
            apiKey = "YOUR_API_KEY" // Replace with your actual API key
        case .development:
            apiKey = "YOUR_API_KEY" // Replace with your actual API key
        }
        
        return apiKey
    }
  3. Build and run the app on a simulator or a physical device.

Architecture

The project is structured using a modular MVVM-C (Model-View-ViewModel-Coordinator) architecture.

  • Model: Defines the data structures.
  • View: Manages UI components.
  • ViewModel: Handles the business logic and state management.
  • Coordinator: Manages the navigation flow and coordination between view controllers.

Network Layer

The network layer handles all API requests and responses, ensuring a clean separation of concerns and easier maintenance.

API

The app uses the OpenWeatherMap API to fetch weather data.

Example API URL:

https://api.openweathermap.org/data/2.5/weather?lat=34.0194704&lon=-118.491227&appid=YOUR_API_KEY

Dependencies

The project uses CocoaPods as the dependency manager and includes the following dependencies:

To install the dependencies, run:

pod install

mlweather's People

Contributors

saulurias avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.