Flo's Weather App Journey

Hey CodeCrew, this is Flo!

I have decided to jump into this challenge as well and I am actually creating the Weather App in a series on my new youtube channel!

This is the link to the introductory episode about the challenge details, the API, a design I will implement and the weather icons that I will use:

The next episode will cover implementing the first part of the design and will come out in about 22 hours as of this post.

I hope that somebody out there enjoys the series!

Cheers, Flo <3

Hey CodeCrew, this is Flo!

I am back with the second episode of my weather app challenge entry, where I start to implement the main UI from a dribbble design, which I showed in the first episode.

Hereā€™s the link:

Cheers, Flo <3

heck yeah! this is a great idea! Iā€™ll go check it out

1 Like

Hey CodeCrew, this is Flo!

Back with the third episode, where I fix some UI issues and continue to build the UI up in general.

Hereā€™s the link:

Cheers, Flo <3

2 Likes

Hey CodeCrew, this is Flo!

I am back with the 4th episode of my weather app challenge entry, in which I clean up the UI and prepare to start implementing the API in episode 5 tomorrow!

Hereā€™s the link:

Cheers, Flo <3

2 Likes

So cool to see you record your progress! Keep it up!

2 Likes

Hey CodeCrew, this is Flo!

A bit late, but hereā€™s episode 5 of my weather app challenge entry, in which I create a model for the JSON API, create an API service and subscribe to the service in a ViewModel.

And episode 6, in which I use downloadable icons and start to show some of the fetched data:

Cheers, Flo <3

Hey CodeCrew, Flo here!

Aaaaaaand back with episode 7!
This episode revolves around refactoring and slight fixes, before tomorrows last major episode, where I will add the ability to add a city using another API route.

Cheers, Flo <3

Hey CodeCrew, Flo here!

I am back with the last major episode: episode 8.
In this episode I create the ability to add cities and fix some other issues.

There will be one last video in the series where I show the final app, i.e. the challenge submission video. Thanks to everyone who watched one of the videos, it really means a lot to me!

Cheers, Flo <3

Thanks a lot for sharing how you created your app. Ducky is really a handy app. Though I followed your instructions to get the data from the API, I couldnĀ“t get my code running. It feels strange to me that your approach with the URLSession.shared any AnyPublisher is obviously working, but so does my solution with URLsession.shared.dataTask and no Publisher at all. ā€œViele Wege fĆ¼hren nach Romā€ :wink:
Looking forward to watching your final video. Again, nice work and thanks for sharing your work in such detail.

1 Like

Thank you so much for watching the videos and the nice comment! Yes, youā€™re right: there are many different ways too implement an API call! I showed the Combine approach, because I believe once you use Combine in a few places you will love it! (At least that happened to me haha)
If you want, I can have a look at why your DataTaskPublisher approach didnā€™t work :smile:
The final video will be out in 1-2 days, depending on when I can find the time to prepare and record it.

1 Like

Thanks. I already ā€œimprovedā€ the code (aka, I deleted the code which was not working). In the meantime, IĀ“m not even sure, maybe it was working.

I have:

  • struct WeatherData (the Ducky code)
  • public class API with a public func getWeatherData(lat: Double, long: double) ā† here I have the URLsession to get the data from openweathermap.org

Now IĀ“m struggling.
I have a view ā€œcurrentTemperatureā€. For testing, in this view I have

  • State private var weatherDataData = [WeatherData]()
  • a func load() {Api()getWeaterData(lat: 35.4418. long: -94.0377)}
  • I added in a VStack .onAppear { load() print(weatherDataData)

In the console, I see all the data for the specified lat/long. If I change the values, I get different results. So, this part is working.

But, I canĀ“t specify any variables to get this data so I can show the temperature etc.
I thought to define a variable as an integer (clouds is Int) as
var clouds: int = weatherDataData.first?.daily.first?.clouds ?? 3 which is not working. Also displaying the value as a String in a Text item is also not possible
Text(String(weatherDataData.first?.daily.first?.clouds ?? 3)) ā†’ shows ā€œ3ā€ in the preview

I think I miss just one step to use the data which is retrieved from openweathermap and displayed in the console ā€¦ but I canĀ“t figure out how. Not yet.

Argggghhhhhhhhhhh, I missed the @StateObject ā€¦ itĀ“s working now ā€¦

1 Like

Flo,
Thanks for sharing your solution and approach.
I am impressed about your skills :+1:.
Gerd

1 Like

I am so glad that you figured it out, as I was clearly too slow with a response to help

1 Like

And here it is, the last video including a small summary and the final submission:

Iā€™m looking forward to the next challenge!
Cheers, Flo <3

2 Likes

Amazing :slight_smile: Well done.