https://github.com/humayan-kabir/weather-ios13
Learning Swift REST API, CoreLocation, URLSession data Task, JsonParsing
https://github.com/humayan-kabir/weather-ios13
Last synced: 11 months ago
JSON representation
Learning Swift REST API, CoreLocation, URLSession data Task, JsonParsing
- Host: GitHub
- URL: https://github.com/humayan-kabir/weather-ios13
- Owner: Humayan-Kabir
- Created: 2021-03-08T13:48:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-09T20:04:06.000Z (over 5 years ago)
- Last Synced: 2025-06-11T05:06:11.468Z (about 1 year ago)
- Language: Swift
- Homepage:
- Size: 2.84 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Weather App iOS
## Goal
This project is a part of IOS Bootcamp which I am completing now on [Udemy](https://www.udemy.com/course/ios-13-app-development-bootcamp). As self starter of learning iOS app development. It's time to work with API and Location service. I have made a beautiful, dark-mode enabled weather app. You'll be able to check the weather for the current location based on the GPS data from the iPhone as well as by searching for a city manually.
## What I learned
* How to use open weather API
* How to create a dark-mode enabled app.
* How to use vector images as image assets.
* Learn to use the UITextField to get user input.
* Learn about the delegate pattern.
* Swift protocols and extensions.
* Swift guard keyword.
* Swift computed properties.
* Swift closures and completion handlers.
* Learn to use URLSession to network and make HTTP requests.
* Parse JSON with the native Encodable and Decodable protocols.
* Learn to use Grand Central Dispatch to fetch the main thread.
* Learn to use Core Location to get the current location from the phone GPS.
### Condition Codes
```
switch conditionID {
case 200...232:
return "cloud.bolt"
case 300...321:
return "cloud.drizzle"
case 500...531:
return "cloud.rain"
case 600...622:
return "cloud.snow"
case 701...781:
return "cloud.fog"
case 800:
return "sun.max"
case 801...804:
return "cloud.bolt"
default:
return "cloud"
}
```