Swift 3.0 networking example: add weather to your app
I threw together a quick and dirty weather controller singleton for a project I’m working on. I couldn’t find any up to date Swift examples, so I figured I’d share this really simple one.
Keep in mind, you need to get an OpenWeatherMap API key (or APPID as it’s also called), which takes all of a minute or two. You would then replace “yourAPIKey” with your API key as a String.
This could be spruced up quite a bit, but it got the job done for my project, where I just wanted to show some very simple weather data, like so: