Complete iOS Weather Application Tutorial for Beginner with Swift

In this tutorial, we show you how to develop a simple weather application for iOS using Swift.

The tutorial discusses:

– How to get user’s current location using CoreLocation
– How to make request to a web api using Alamofire
– How to read JSON response using SwiftyJSON
– How to display loading indicator using NVActivityIndicatorView
– How to set gradient background to UIView

You can download the source code along with weather condition images here: https://mega.nz/#!0MlkDIKI!C4eZpyfhKUP3399N1ZKBuPPmfBdXmpvorymQXC6dOUg

The weather images used in this video are design by Freepik https://www.flaticon.com/authors/freepik

Comments

Raul Gutierrez says:

very nice tutorial. thanks for sharing!

Brandon Seidman says:

m following this tutorial and for some reason when I get to self.locationLabel.text = jsonResponse[“name”].stringValue i get the error Thread 1: signal SIGABRT. Any idea why?

David Rodríguez Salort says:

Nice work! Can you add option for searching any location? thanks

CodeChamp says:

hey when i installed pod , all of the above code you wrote downloaded as well in my project , how ? i am new , plus its only reading san fasico location weather why not my city ?

João Paulo Silva says:

Great tutorial.
However when i launch my app it only shows the weather in San Francisco
What do i need to do to show my current location?
Thanks

yemen son says:

It’s really awesome.. thank you so much & one more thing I would like to ask you.. can you add option for searching for any location or country

Marco Viscito says:

Hi everything was working great for me, even after I changed a few values to suit my purposes, until I got the gradient stage where for some reason only the gradient was showing and nothing else. Do you know why? Thanks – Marco 🙂

eragon tran says:

Man you are doing a great job .. keep up!

Markiyan Pryssiaznuk says:

hey man, cool tutorial but when i passed it, and launched the project first thing that iphone simulator wasn’t asking to allow or not to allow a location, so it was just loading forever idnk why it doesn’t work cause i checked plist and everything was correct and second thing that when in settings of simulator i put on the location for Weather app, it stoped loading but it was showing only a background noone label was showed with this thing i don’t know what to do, cause every outlet is connected, plz help
also i downaled your project runned it and it showed my location uncorrect, wtf is whis my mac?)
i copyied your viewcontroller cause mb i missed during lesson something but no, same code, same problem nothing heppned

Nikita Whale says:

how to get a weather forecast for a week, not the current day?

Nitesh Singh says:

Great tutorial,
Created my first app following this.
Zen Forecast
https://itunes.apple.com/ca/app/zen-forecast/id1411787541?mt=8

Reiner Wahnsinn says:

Is the Second Part in the making ?
I really found it helpful so far.
Thank you

Jason Kendall says:

Working on this right now, thanks for the great tutorial!

vperea1204 says:

Great tutorial, am working on it now. Is there a way to build it out for say, 5 days? Thanks!

별자리TV says:

Thank you very much

 Write a comment

*

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!