SwiftUI example project - Astronomy Picture of the Day API - Part 1 - MVVM and Combine framework

preview_player
Показать описание
An example project that demonstrates fetching data from the network with Combine and SwiftUI.
In this tutorial, we will learn how to make a REST API call in Swift. We will talk about URLSession to make fetch requests. Then we will parse the returned JSON data with Codable and display the data.

00:00 Introduction
02:39 project setup
13:18 Networking with JSON and Decodable
25:35 Introduction to Multithreading and Grand Central Dispatch
30:16 SwiftUI preview with data for the Networking layers
36:08 Fetching images
40:13 Changing the date for the APOD
53:38 Add an loading animation

If you liked what you learned and you want to see more, check out one of my courses!
👩🏻‍💻 Combine course

#SwiftUI #Networking # CombineFramework #MVVM
Рекомендации по теме
Комментарии
Автор

Hi Karin,
danke Dir für Deine Videos, finde die echt sehr hilfreich.
Mach weiter so, ich freue mich schon auf weiteren Content von Dir.
LG

lowkeylyesmith
Автор

Hello Karin! this video is great!!, would you please make the video 2 non private? i would like to continue, thanks!

jrambo
Автор

A few notess:
- there is no need to spell out every string literal for CodingKeys, only those that differ. E.g. case title, case url, case description = "explanation", case date
- there is no need for the init(from decoder: Decoder). You can omit the properties you do no need and they will be ignored
- there is .decodeIfPresent(…) method useful for optionals.

RimantasLiubertas
Автор

Nice and great Work! Thanks for sharing

abdouett
Автор

Cool Project!
15 Minutes into the Video and i'm lost :D
Can't find the book "App Development with Swift", do you have a link?

florensfraidling
Автор

Is this a video from 2020? Why did you only upload it now? Just wondering.

Greenstonemovies
Автор

I think that publishers should be declared as private(set) var .

abdouett
Автор

Hey, can you please approve the refund for me. I have asked it on your website since last week and have received no response.

hellosimran
join shbcf.ru