Location based air quality information, on your iPhone and your Apple Watch. Swift 5, iOS 11.0-13.3, and watchOS 4.0-6.1.1 compatible.
The first step is to acquire your own token for the WAQI API access.
Look up the token
constant in APIService.swift
and replace the dummy string with your token.
The project has no external dependencies at the moment, so you should be fine building/running it. 👍
From the public API of the World Air Quality Index Project originating EPA.
- iPhone app
- Watch app
- Watch complication
There's always room for improvement, Smogler is no exception.
1. Make sure things fetch the API only when necessary and try to move all the load possible to the iOS app. That was the initial goal, but there are so many scenarios (iOS app active, background, etc., Watch app active, background, ...), I might have gotten a bit lost sorting these out.
2. Writing tests for the Watch extension is not trivial, but it would be nice to see how it's possible.
3. Push notifications - to be alerted in case the air quality dropped, for example.
4. More supported complication families?