Skip to content

An OpenWeather API example app using Swift and UIKit

Notifications You must be signed in to change notification settings

CodeNextPaco/Weatherly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 

Repository files navigation

Weatherly

Description

An iOS app written in Swift that displays real-time weather from the Open Weather API of a city inputted by a user. This is a single page application that scrolls vertically, containing 3 major UI segments: current weather, 5-day forecast, and current weather specific metrics.

Prerequisites

The prerequisite(s) are installed using Swift Package Manager instead of Cocoapods. Upon the first build, SPM should download the dependencies automatically.

Update the Weather API key inside Model/APIManager.swift

Installation

  • Clone/Download the app to your Mac
  • Check that you have the latest build of XCode installed.

Quick start to Weather API Requests

  • GET Current Weather in Irvine: https://api.openweathermap.org/data/2.5/weather?lat=33.6846&lon=-117.8265&appid=<INSERT_API_KEY>&units=imperial
  • GET Current Weather in Bangkok: https://api.openweathermap.org/data/2.5/weather?lat=13.7563&lon=100.5018&appid=<INSERT_API_KEY>&units=imperial
  • GET 5day/3hr forecast in Irvine: https://api.openweathermap.org/data/2.5/forecast?lat=33.6846&lon=-117.8265&appid=<INSERT_API_KEY>&units=imperial

Notes for Technical Writers

Strech goals for students

  • Store searched results in user defaults
  • Search Bar provides suggested locations as user types

Callouts

  • We are using @IBDesignable RoundedCornerView class which extends UIView to set rounded corners in storyboard rather than programatically. Sometimes, after setting the corner radius in the attributes inspector, the views' corner radius will not update visually on the storyboard. Toggle Editor->Refresh All Views.

Resources

Contributing

License

  • MIT LICENSE

Contact

  • Derek Chang (contract dev - July 2022, former iOS Guru): [email protected]
  • Paco (contract dev - 2022)

About

An OpenWeather API example app using Swift and UIKit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages