This is the 6th video in a 7 part series on building a #SwiftUI app using #WeatherKit.
In this video I am going to show you how you can use the CoreLocation and MapKit frameworks to search for and add cities by name. Final persistence video on Wednesday. https://youtu.be/puelrPxXj-8
This is the 5th video in a 7 Part series on building a full #SwiftUI weather app using #WeatherKit.
In this video we will be adding the final forecast type and that is a 10 day daily forecast.
I am moving up my release schedule for my 7 part #SwiftUI#WeatherKit series. Here are the latest two in the series.
Make your app shine with dynamic backgrounds hourly forecast and an updated UI.
In this video we will introduce locationManager so that the app will be able to determine your current location and display the weather for that location when the app launches.
The first video of the new 7 part #SwiftUI video on #WeatherKit is now available. All 7 will be released before WWDC. Next one comes on Wednesday.
Buy me a ko-fi and get access to all 7 now (ko-fi.com/StewarLynch) https://youtu.be/8qz1LxtM7aI
Brand new, free 7 part #SwiftUI#WeatherKit series coming to my YouTube Channel starting May 19. Buy me a Ko-fi now and get immediate access to entire series. My monthly subscribers already have it.
Regarding the issue I noticed with Apple WeatherKit not returning a 10 day forecast sometimes, @kaidombrowski mentioned that he's seen this recently also and pointed out that you can see this reflected in the Apple Weather app.
Sure enough, at 7:30AM CDT it shows a "daily forecast" with 9 days for Rosemont IL. But at 10AM CDT it shows a "10 day forecast" with 10 days.
I'm now thinking that the problem I'm seeing with WeatherKit not returning weather for 10 days might be based on what time of the day it currently is.
I couldn't recreate it yesterday afternoon. Woke up this morning and could easily recreate it. Waited two hours and it's not happening again.
With the same start and end time in Chicago when I made a request around 8am EDT it returned 10 days of hourly info but only 9 days of daily info. Around 10am EDT it returns 10 days of both.
I've noticed something odd with WeatherKit the last few days.
I ask for the weather from the start of today to 9 days from that. The day that is 9 days away has limited data (no hourly data but some limited data about the day). That’s fine.
The last few days I’ve noticed my app not showing info for the day 9 days away sometimes.
I decided to do some logging and record what the first and last hours and days returned are before I use the data from WeatherKit.
The images attached show the last daily info returned as April 23 but also as April 24 in another attempt for the same city for the same dates. I did both of these attempts between just now (nowhere near midnight CDT) so there should be no difference in what is returned.
Every since I made @PleaseDontRain I've been bothered by snow in my precipitation chart. The amount show just seemed drastically too low. Posted in the dev forums and got an answer that the hour's precipitation is in LIQUID format. Made sense that the value would be less.
Today I saw a chart in the iOS weather app where the snow was much bigger than the rain, which is what I've expected all along. PDR looks very different.
So I did a deep dive into the raw data I'm getting from WeatherKit.
The precipitationAmount for the snow for the hour lined up with what I'm reporting in my app.
But WAIT. My eye spotted that there's a "snowfallAmount" property. And these values are matching up to what the iOS weather app is showing for snow for the hours in question!
AwesomeCache: I used it to cache weather data from Dark Sky. I'll now use Apple #WeatherKit to fetch the wind forecasts and cache them in my Core Data store, if needed.
I couldn't understand why my hourly charts had unexpected axis marks when I asked for weather for a location that has a time zone offset that is NOT in hour increments from GMT.
For example, Nepal is +5:45. I ask for weather for today, starting at midnight in Nepal, to 9 days from that.
The daily results start with 12AM in Nepal as expected. However, the hourly data starts at 12:45AM in Nepal.