vuinguyen / FishingDaze

A fishing journal app to document fishing trips, built for my capstone project, for my Udacity iOS Nanodegree program.
1 stars 1 forks source link

Bonus: Use Combine to avoid Callback Hell #29

Open vuinguyen opened 4 years ago

vuinguyen commented 4 years ago

Since Combine is fairly new (out in iOS 13), I'm not positive it will be allowed for my capstone project during the Udacity project review.

So, I'm making a note of it here, that I may come back and refactor my project to use it later, after I've submitted my project for review.

https://developer.apple.com/documentation/combine

Combine could be very helpful with decoupling nested asynchronous calls, which is something I will have to deal with for implementing the Weather feature. Because I'll need to call location services, then pass that data into the completion handler to call the Weather API, and in that completion handler, call code to update the UI with weather data. Since Combine uses a Publisher-Subscriber paradigm, functions are just listening for updates, and can be decoupled from one another.