
Register for a weather API key and log in to access weather data. Install CocoaPods and Alamofire and SwiftyJSON to fetch data and set up your app project.
Install and configure CocoaPods to manage third-party libraries in a Swift Xcode project, including creating a Podfile, specifying library versions, and using a workspace.
Learn to use the WeatherBit API to fetch current weather, daily and hourly forecasts, icons, and API key usage for city or GPS coordinates.
Learn to call a current weather rest api, parse the json response, and map city, temperature, feels like, description, icon, sunrise, and sunset into a current weather class for display.
Create a current weather model in Swift, build a get current weather function, and parse API responses with SwiftyJSON for the weather app.
Create a current weather class with private vars for security and public setters for city, temperature, humidity, and visibility. Private fields are restricted from other files; safe defaults prevent crashes.
Learn how to set weather data from JSON in Swift by parsing a nested array and dictionary, using private variables with public getters, and converting Unix timestamps to dates.
Navigate json data to extract description, temp, humidity, wind, and other fields. Implement an escaping completion callback to notify when data downloads and update the current weather city and values.
Create an hourly forecast class for the Swift weather app, with date, temperature, and weather icon as private properties with getters.
Build an hourly forecast feature by requesting a 24-hour rest api endpoint, handling the completion response, and parsing json into an hourly forecast object with time, temperature, and weather icon.
Parse the json dictionary to access the data part and extract the 24-hour hourly forecast array. Instantiate hourly forecast objects for each hour and deliver them via a completion callback.
Test hourly forecast by fetching from the API, printing forecast data, validating daily and weekly data structures, and building a UI to display temperature, date, and weather icons.
Implement a weekly weather forecast class that downloads seven days of data via a REST API, removes the current day, and returns a six-day forecast through a completion handler.
Design a single weather view with a scroll view to swipe between city views. Add a toolbar with a page control and ensure layout via auto layout and storyboard connections.
Reset the weather view controller outlets, configure the scroll view and page control, and design a reusable city weather view to display multiple cities by sliding left to right.
Design and implement a weather view in Swift using a xib file, with a top fixed section and a scrollable bottom, including city, data, and temperature labels.
Design the bottom area with a scroll view, a container view, and nested collection views and a table. Set a low-priority equal-height constraint to the scroll view.
Configure the weather view controller as a UIView and connect outlets for the main view and key labels, then wire hourly weather collection, weather information collection, and the table view.
Initialize weather view by loading its nib from main bundle, adding the main view as a subview, and configuring frame and autoresizing masks; register table view and collection view cells.
Test the weather view instantiation by adding it to the scroll view and adjust its frame after view did appear to match the screen size, ensuring proper layout and centering.
Implement the weather view to display current weather by wiring a current weather model to city, date, and temperature labels, and add a date extension for a short date format.
Expose a public refresh data function that calls a private updater to fetch current weather from the REST API and update the weather view with Celsius temperature and clear sky.
Design a reusable hourly forecast collection view cell with a top label, center image, and bottom temperature label. Populate it from hourly weather data using a date extension for time.
Create a reusable hourly weather cell by importing icons as assets, building a global helper to fetch weather icons by type, and displaying images and labels in SwiftUI.
Design a Swift weather app collection view cell with an image and labels, using auto layout. Implement a WeatherInfo struct and generate cell function to populate text and optional image.
Design and implement weather table view cell for Swift weather app, wiring day of week and temperature labels with an icon, auto layout constraints, and 60-point height from forecast.
Register custom cells for the table view and collection view, configure nibs and reuse identifiers, and set up data source and delegate relationships for hourly weather forecast and info collections.
Extend the weather view with table and collection view data source and delegate extensions, conforming to their protocols and implementing methods to display weekly, daily, and hourly forecasts.
Create three download functions for current, weekly, and hourly weather in the weather view, using the location parameter and refreshing the view with model data.
Call functions to download current, weekly, and hourly weather, initialize the weather view, and refresh table and collection views to populate information in the user interface.
Set main view to light gray, top to dark gray, and labels to white; hourly background dark green, container light gray, and collection and table views dark gray; disable selection.
Fix the scroll view bug by adding a bottom constraint set to zero, ensuring vertical scrolling of current weather and weekly forecasts, and enable different cities to slide through.
Create weather info objects from current data, format wind speed, map humidity, pressure, visibility, and UV index to images, and refresh the collection view after setup.
Populate the weatherInfo items by feeding wind, humidity, pressure, visibility, UV index, sunrise, and sunset into the data array, and format strings for clear meters per second and other units.
Make the weather model dynamic by introducing a weather location struct with city, country code, and a current location flag to build a dynamic url for weather data.
This lecture demonstrates making the weather app model dynamic by creating an api file, defining endpoint constants with placeholders, and updating hourly and weekly forecast calls using the rest api.
Test dynamic weather location by creating a WeatherLocation object, passing it to current and weekly weather fetchers, and saving cities with user defaults for automatic weather loading.
Design the all locations UI for a Swift Weather app, featuring current and saved locations, a city search flow, and a table view with subtitle cells for offline city selection.
Load cities from a csv file into an array of weather locations, then filter them in real time using a search controller and a table view, displaying matches.
Parse csv data with a try-catch, read from a url, and split into city, country, and country code, skipping the header to create weather locations.
Create a private function to build a weather location from a line of strings and append it to all locations, then set up the table view data source and delegate.
Configure a search controller in the Swift Weather app to search by city or country, updating results live and embedding the search bar in table header.
Explore implementing a search controller to filter weather locations by city and country, update search results in real time, and refresh the table view.
Save and load a location using user defaults by maintaining a saved locations array, avoiding duplicates via Equatable conformance, and persisting with the standard user defaults.
Encode and decode weather locations to store them in user defaults using a property list encoder and decoder, ensuring weather locations conform to a Codable, property list friendly format.
Dismiss the search controller and table view on selection to return to the previous screen, and set up a tap gesture to dismiss the table and load saved locations.
Implement a protocol and delegate to transfer a new location from the choose city view to the all locations view, and update the list stored in user defaults.
Load and decode saved locations from user defaults to populate the weather locations table view, enabling display of saved locations when opening the all locations controller.
Design a custom weather table view cell with city name and Celsius temperature labels, configure constraints and appearance, and connect a simple weather model for display and reuse.
Create a city temp data struct in Swift to hold city and temperature values, pass it to the weather table cells, and format the unit based on settings.
Implement table view data source and delegate to display city temperature data, safely handle optional weather data, configure reusable cells, and delete saved locations from the table and user defaults.
Implement a function to delete a city from saved locations in user defaults by matching the city name, removing the entry, and re-saving with property list encoding.
Redesign the weather view controller to support multiple saved locations by obtaining the current GPS coordinates with Core Location. Request when-in-use authorization and conform to CLLocationManagerDelegate.
Request and manage location authorization to obtain current coordinates for weather, stop significant location changes monitoring to save battery, and retry until users grant when-in-use access.
Define a location service class as a singleton to hold current latitude and longitude, update it from the location manager, and construct api urls for current, weekly, and hourly weather.
Load saved locations from user defaults and the current location, decode them, create weather views for each location, and display them in a scrollable card stack.
Create a weather view for each saved location, populate it with current, weekly, and hourly data from a REST API, and arrange these views in a horizontal, paged scroll view.
Test the weather views across multiple locations, fix nil unwrap errors, pass the current location to the model, and enable snappy paging for city data.
Set the page control to the number of locations, call the get weather function as data loads, and update the selected page via the scroll view’s content offset.
Learn to implement and update a page control in a Swift weather app, ensuring current page syncing with user swipes and managing location updates via view lifecycle methods.
Generate cityTempData for each location by combining city name and current temperature from current weather, then reset and populate the all weather data array for the table view.
Pass city temp data to all locations via segue, then debug and refine deletion to update user defaults, addressing empty city names returned by the API.
Fix the city name becoming empty when the weather API returns no data. Preserve the location city before completion so chosen cities stay visible when a cell is tapped.
Implement an all locations delegate to pass the selected location back to the weather view via a protocol, handle table view did select at index path, and prepare for segway.
Diagnose an index out of range caused by doubling weather views and implement a shouldRefresh flag to refresh only when deleting or adding locations.
Implement a shouldRefresh flag to trigger table and weather data refresh when adding or deleting locations, persist changes to user defaults, and format temperatures dynamically in Fahrenheit or Celsius.
Explore implementing a temperature format toggle with a segmented control in a Swift Weather app, wiring outlets and an action to switch between Celsius and Fahrenheit and test the selection.
Set up saving and loading the temp format in user defaults using a segmented control to switch between Celsius and Fahrenheit, refresh the weather view, and persist the selection.
Test run validates loading and applying temperature format from user defaults, refactors load functions for temps and locations, and attaches a table footer view for persistent UI.
Create and use a temp format model and global helpers to fetch and convert temperatures from user defaults, supporting Celsius and Fahrenheit with conversion functions.
Implement temperature handling in the Swift weather app by using get temp based on Celsius, handling optional JSON values with a default zero, and formatting to decimal with Fahrenheit support.
Fix the dynamic temp format bug by using a placeholder-based format for current and forecast temperatures, honoring Celsius or Fahrenheit via user defaults, and clear weather scroll subviews on load.
Set the main storyboard view background to dark to match the app, then rerun to confirm a consistent dark theme across the interface. Enjoy building and rate the course.
In iOS 12 Weather App we are going to build real world iOS application. And when I say real world, I mean you can use this App every day!
Unlike any other courses found on Udemy, I always teach full real world apps, when we finish with the course, you are going to have an app ready to post to AppStore
What our app will include:
Current weather for your current location
24 hour Weather forecast for your current location
Weekly (7 days) weather forecast for your current location
Current weather for Any City of your choice
24 hour Weather Any City of your choice
Weekly (7 days) weather forecast Any City of your choice
How to use REST API
HTTPS calls
How to write clean readable code
Create custom views using storyboard and XIB files
Working with TableViews
Working with CollectionViews
Gesture recognisers
GPS Location with MapKit
Working with JSON
Using SwiftyJSON
And many more...
This iOS12 Weather App is NOT beginner level course. You need to know your way around the xCode, be familiar with it, you have to have basic knowledge in Swift and application building. We are going to start from scratch and build the application together. All assets will be provided by me. I will type and explain every line of code. the course is around 20 hours long. And by the time we finish, you will learn a lot of new things even if you are experienced iOS developer.
The curse will teach you how to write clean code, structure your app development, so even if you get back to your code in few years, you can read and understand it clearly.
We are also proud to say that we have one of the best Support available on Udemy! Our Q/A Section is constantly monitored and all questions are answered within few hours, Sometimes we even chat with students in real time to help them with the issues they may face during the study.
Don’t waste your time on low quality courses where you don't even get support of the instructor
Your time is precious. We offer the best video courses with carefully crafted content, we are learning by coding!
Don't just take our word for it, check out our other courses and what other students have to say about our courses!
"This course is so far the best course I took in UDEMY. I really learned something. Totally worth the time. Won't regret it. The instructor was responsive too and the course is new and knowledgeable." J Nima
"A excellent Tutorial by david. Very good explanation" Tapan Kumar Raut
"There is nothing on Udemy like David's courses! I cannot recommend his courses enough. Best teacher out there, very responsive as well. " Kris
"I really do love the approach, the structure of the course gives you the ability to move forward smoothly, and efficiently gain as much knowledge as possible, the instructor really goes in-depth, it's incredibly comprehensive, not to forget that this is a real world project, and the advanced concepts gained here make me all confident that i'll be able to build my own apps in a very effective way. the course is well taught, and it really deserves the 5 stars, the instructor as well, he explains things in a very clear, clean way. Definitely enjoying the Course. and definitely Thumbs Up." Yen Loo
"This is one of the most complete and comprehensive iOS projects on Udemy! Everything works! No broken code! You learn Firebase, Onesignal and Backendless in one project. The instructor is always accessible, he goes for quality not quantity. I still have a way to go, but so far it has kept me completely engaged and focused! I wish there were more courses like this! I will definitely purchase another from David." antr8tr
We are so confident that you'll love this course that we're offering a FULL money back guarantee for 30 days, No Questions Asked! So it's a complete no-brainer, sign up today with ZERO risk and EVERYTHING to gain.
So what are you waiting for? Click the Buy Now button and join the best iOS 12 Weather App development course and lets get started.