ky-is / Two-Days-Weather

A barebones iOS app to display the temperature for today and tomorrow.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two Days Weather

Weather App Icon

Local development

Two Days Weather uses Open Weather Map's forecast API. Sign up for a free API key and add Secrets.swift with:

let openWeatherMapAPIKey = "YOUR_API_KEY"

Dev notes

UI

  • Didn't use Storyboards for the app UI (just the launch screen). I've actually never done this with a UIKit app before, so that was interesting.

Data source

  • The app caches the 5-day forecast in 3-hour intervals from OpenWeather
    • "Today" is displayed as the temp at the next 3 hour time. "Tomorrow" is the temp at the current time of day, 24 hours from the current time.
    • The cache invalidates once per day. It should be made smarter by always defaulting to the cache and then opportunistically updating from the API.
    • It listens for significant location changes and re-fetches from the API.

Database

  • All data is stored locally in Couchbase.
  • First time working with it. I'm probably not doing things very idiomatically.

About

A barebones iOS app to display the temperature for today and tomorrow.


Languages

Language:Swift 99.4%Language:Ruby 0.6%