Learn Courses My Dashboard

Guillermo's Weather APP Journey

Hi, I am Guillermo. I have been studying Swift and IOS Dev for the last couple of months. This is my first challenge :face_with_monocle:

1 Like

Ok, so first things first. I’ve created a Trello workspace with all the tasks and requirements.

So I will be doing some tasks first that are kinda “planning”. I am not familiar with the OpenW API yet so I need to give it a look.

1 Like

Fetching the OpenWeatherAPI for current weather

Hello everyone :cold_face:, so today I worked on a simple task: Showing the current weather. I had to learn about URLSession and ended using URLSessionDataTask. I think that I will be switching to an approach that uses Combine. Either way, I am happy with the result:

Next Steps

  • Fix the layout so the temperature unit chooser stays at the top of the view/
  • Load data for the next 12 hours.
1 Like

Hello again, so I’ve made some progress with the challenge… First of all, I realized that the only way to get the hourly weather was using the OneCall API, which required the GeoCoding API. So I proceeded by creating a service for the OpenWeatherAPI and then I created two methods that returned a Publisher. Then I used flatMap to chain those requests.
After that, I included all the information on the UI, which now contains the hourly forecast.
I come from web development, specifically on Angular, so combine is pretty similar to a library called rxJS, that was pretty neat.
Next Steps

1 Like

Hello, back again with some progress. I added a separate view to handle city selection and addition. I am using SharedPreferences to store the cities that have been added. I only have one blocker (a visual one). Do any of you know why my List has a “gray” background with small white boxes? That only happens when I place the List inside a navigation view with the toolbar item.

1 Like

Almost Done

Hello, I am almost done with the challenge. I need to get the user location (extra credit). I will post some screenshots of my progress so far.

1 Like