Code Monkey home page Code Monkey logo

code-test-get-current-weather's Introduction

Code-Test-Get-Current-Weather

Project Name: Code Test – Get Current Weather Repository URL :https://github.com/elSantosh/Code-Test-Get-Current-Weather

This project will allow user to select three cities in Australia and return the its current weather in five fields of data. All the obtained data is from https://openweathermap.org/api. The units which I’ve used to show the result is in metrics.

alt text

Coding Flow:

UI in HTML on WKWebView with custom web configuration (UIWebView is depreciated) Network Request and UI Update with JavaScript. Core Data DB Usage. Managed Internet Connection when there is no internet. Unit Testing. UI Automation Unit Testing via UI flow record functionality in Xcode.

Networking:

Get city name from the HTML select tag value with wkwebview evaluateJavascriptFromString method. And and used a method from config class to construct URL to avoid ambiguity.

URLSession has been used to call the API and result obtained was in JSON format. Using swift’s own JSONSerialization, I have parsed the result with help of debugging method.

Dispatch Queues Usage:

Safely handled UI updates with dispatch threads. And updated operation of UI on main queue.

DataBase:

CoreData was used to store the weather information of the cities and retired it when there is no internet connection.

Entity Structure: {City {name, updatedTime, weather, temperature and wind}}

Systems Used:

Macbook pro, User name: Santosh Guruju 2. iMac , User Name: apple

Execution:

Open .xcodeproj file from the folder “Code Test - Get Current Weather” Change bundle Id to any of you own bundle id generated for this project. Change apple developer account to your account. Changes device to any of your iOS device. Press “command+shift+U” to run unit tests and check the test result. Press “command+R” to execute the project.

Note: Hopefully everything works smoothly!

code-test-get-current-weather's People

Contributors

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