1. WeatherKit: Introduction and CurrentWeather Conditions

  Рет қаралды 1,527

Stewart Lynch

Stewart Lynch

Күн бұрын

WeatherKit provides timely weather information including current conditions, minute precipitation, along with hourly, and daily forecasts. It also provides severe weather alerts.
In this series we will be building a personal Weather application.
Of course, there are better applications out there, including Apple's own Weather application so why would you want to build your own.
Well, if you are creating an application that includes different destinations like a travel app or one that uses MapKit, you might want to include the ability to check out the weather in those locations either now, or get the forecast for the next 24 hours for the the next 10 days.
WeatherKit offers valuable weather data for your apps and services to help people stay up to date on the latest conditions.
By the end of this series, you will be able to do that.
If you want to support my work, you can buy me a coffee :)
ko-fi.com/stewartlynch
Table of Contents:
0:00 Introduction
1:08 Application Demo
3:02 New Application and Enabling WeatherKit
6:52 WeatherManager Class
11:05 ForecastView
19:14 Attribution
Starter Project Branch:
None
Completed Branch:
github.com/StewartLynch/MyWea...
WeatherKit Series Playlist
Other links mentioned in video:
******* Download my StewartLynch KZfaq Channel Application - Free **********
stewartlynch.gumroad.com/l/obsjz
Other Affiliate links
BigMountain Studio Books
SwiftUI Views Mastery
www.bigmountainstudio.com/vie...
SwiftUI 5 Book Bundle
www.bigmountainstudio.com/boo...
Combine Mastery in SwiftUI
www.bigmountainstudio.com/com...
Core Data Mastery in SwiftUI
www.bigmountainstudio.com/cor...
SwiftUI Animations Mastery
www.bigmountainstudio.com/ani...
AppCoda Books
Beginning iOS 16 Programming with Swift (SwiftUI + UIKit)
gumroad.com/a/646790611/WihuX
Beginning iOS 16 Programming with Swift (SwiftUI + UIKit) - Starter
gumroad.com/a/646790611/mOzKq
Mastering SwiftUI 4 + Swift Programming for iOS 16 - Professional
gumroad.com/a/646790611/gjPBw
Mastering SwiftUI 4 - Starter
gumroad.com/a/646790611/TyNEz
Other References:
Stewart Lynch's KZfaq Channel:
/ @stewartlynch
Stewart Lynch on Mastodon:
iosdev.space/@StewartLynch
Stewart Lynch On Threads:
@StewartLynch
Stewart Lynch on X:
x.com/StewartLynch
Stewart Lynch on LinkedIn
/ stewartlynch

Пікірлер: 19
@indianfyre
@indianfyre 2 ай бұрын
All your videos are amazing Stewart, thank you! Will be watching keenly for the next few videos
@holycrosscv
@holycrosscv 2 ай бұрын
Brilliant beginning, Stewart. So many helpful hints here. I look forward to the rest of the series. Thanks as always!
@StewartLynch
@StewartLynch 2 ай бұрын
Glad you enjoyed it
@abdouett3676
@abdouett3676 2 ай бұрын
Great work! Thank you!
@StewartLynch
@StewartLynch 2 ай бұрын
Glad you think so
@schlumpfpapa6810
@schlumpfpapa6810 2 ай бұрын
Hi, great Video. One question though: At 13 min 31 s in ForecastView's body's task modifier. If you set isLoading to false after the Task.detached, it would be executed immediately, wouldn't it?
@StewartLynch
@StewartLynch 2 ай бұрын
Good catch.
@dibjr
@dibjr 3 ай бұрын
Great Video! But weird! Your Vancouver temp when you recorded is the same as the Duluth, MN temp now!
@nickdev32
@nickdev32 Ай бұрын
Hi Stewart, great video. Quick question - why do we need detached tasks that run on the main thread inside the task modifier? My understanding is that task modifier runs on the main thread already. And if the weather manager functions are already running on background threads, the task modifier should assign the values to your @State properties on the main thread. Lmk, thanks again!
@StewartLynch
@StewartLynch Ай бұрын
I was just following Apple’s example here.
@Prashant-7
@Prashant-7 2 ай бұрын
1) can you pl expalin why we use task.detached ? , 2) temperature property from response does contains C, F in it because i. can see MeasurementFormatter created but we did not pass anything that says it is temperature unit sorry if it is silly questions Thanks
@Prashant-7
@Prashant-7 2 ай бұрын
may be nonisolated func if we want to run code other than main actor ? May be I am missing something
@Prashant-7
@Prashant-7 2 ай бұрын
@StewartLynch Everyone gets answer other than me, may be i asked wrong question
@indiekiduk
@indiekiduk 2 ай бұрын
The async tasks and formatting don’t seem standard SwiftUI and have bugs. Eg the loading spinner won’t show and the label won’t reformat on region settings change. If this is from the weaktherkit sample then sadly it’s common that these other teams don’t use SwiftUI correctly.
@Prashant-7
@Prashant-7 2 ай бұрын
async task whats wrong with that , is there any doc that you recommend ? asking because i want to learn best practices
@tazman7689
@tazman7689 2 ай бұрын
Great video, look forward to the rest of the series. As always, well presented. I would like to know why the task is detached and really what it means to detach a task? With WeatherManager why is it a singleton and not an observable class, is there a benefit to that?
@StewartLynch
@StewartLynch 2 ай бұрын
I am following Apple’s example here
@spiffylogic
@spiffylogic Ай бұрын
23:25 can you explain how using the string initializer explicitly solves this issue?
@StewartLynch
@StewartLynch Ай бұрын
THe Text iew initializer’s default is a LocalizedStringKey so using the initializer (.init) converts the markdown to a localizedString
2.  WeatherKit: LocationManager and CurrentLocation
21:02
Stewart Lynch
Рет қаралды 535
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 52 М.
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 38 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 45 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 128 МЛН
What's going on with Windows Laptops?
10:30
Marques Brownlee
Рет қаралды 2,7 МЛН
3.  WeatherKit: Conditions Backgrounds and Other Cities
19:50
Stewart Lynch
Рет қаралды 339
Xcode templates, projects, targets, schemes and workspaces
24:42
Stewart Lynch
Рет қаралды 2,6 М.
The ARM chip race is getting wild… Apple M4 unveiled
4:07
Fireship
Рет қаралды 1,2 МЛН
Introduction to SwiftData - iOS Development
12:51
iOS Academy
Рет қаралды 9 М.
Deep Dish Swift 2024 Talk - Stewart Lynch
39:10
Stewart Lynch
Рет қаралды 4 М.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 236 М.
Bluetooth connected successfully 💯💯
0:16
Blue ice Comedy
Рет қаралды 1,7 МЛН
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,8 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 64 МЛН
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 1,1 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 5 МЛН