Coder Social home page Coder Social logo

akzh4n / vemo_project_ios Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 43.64 MB

VEMO is a project to be developed in Swift for iOS devices. The project aims to automate the search for car information for people who are interested, the point is that the application will be connected to a common database which contains information about many cars.

License: MIT License

Swift 99.13% Ruby 0.87%
ios api swift vehicle vin cars firebase cocoapods login-screen registration-screen

vemo_project_ios's Introduction

Vemo App

VEMO is a project to be developed in Swift for iOS devices. The project aims to automate the search for car information for people who are interested, the point is that the application will be connected to a common database which contains information about many cars.

The user by entering the car number, get full information about the model of the car, year of manufacture, and general information, etc.

 

Presentation Screen

           

Login, Register Screens

     

Search, Settings, Info Screens

           

Features

  • The app is available on the new version of Xcode and iOS 16.0
  • Ability to register and login using Firebase
  • Ability to search for vehicle information using the VIN and auto.dev API
  • Comfortable UI/UX Design
  • Open to all devices

 

Code Review

  • API Request
   
    let baseURL = "https://auto.dev/api/vin"
    
    func getRequest(for vinCode: String, completion: @escaping ((Vehicle) -> ())) {
        if let url = URL (string: (baseURL + "/\(vinCode)" + ("?apikey=YOURAPIKEY"))) {
            
            let authtoken = "YOUR AUTH TOKEN"
            
            var request = URLRequest(url: url)
            request.addValue("application/json", forHTTPHeaderField: "content-type")
            request.addValue("Bearer \(authtoken)", forHTTPHeaderField: "authorization")
            
            request.httpMethod = "GET"
            
            URLSession.shared.dataTask(with: request) { (data, response , error) in
                guard let data = data else { return }
                
                if let model = try? JSONDecoder().decode(Vehicle.self, from: data) {
                    print(model)
                    completion(model)
                } else  {
                    print("Error")
                }
                
            }
            .resume()
        }
    }
    
  • Vehicle Info
 
 struct Vehicle: Decodable {
    let make: VehicleMake?
    let model: VehicleModel?
    let transmission: VehicleTransmission?
    let price: VehiclePrice?
    let years: [VehicleYears]?

}

struct VehicleMake: Decodable {
    let id: Int?
    let name: String?
    let niceName: String?
}

struct VehicleModel: Decodable {
    let id: String?
    let name: String?
    let niceName: String?
}

struct VehicleTransmission: Decodable {
    let numberOfSpeeds: String?
    let availability: String?
    let transmissionType: String?
    let automaticType: String?
}


struct VehiclePrice: Decodable {
    let baseMsrp: Int?
    let deliveryCharges: Int?
    let estimateTmv: Bool?
}


struct VehicleYears: Decodable {
    let id: Int?
    let year: Int?
}

 

Installation

Requirements

  • Xcode 13+ with an iOS 13.0+ simulator
  • Firebase CocoaPods
  • auto.dev API

Installation steps

  1. Clone the repo: git clone https://github.com/manste1n/vemo_project_ios
  2. Register your Firebase Project by instructions in official page

 

Thx for attention :3

You can support me by following :>

vemo_project_ios's People

Contributors

akzh4n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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.