Making an API call and fetch JSON data in SwiftUI

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Best tutorial! You literally explained everything one needs in 15 minutes, which could be understood after hours of fail!

yeserguitar
Автор

OMG THANK YOU. Best tutorial ever. Was struggling all day to get my api to return data to a List. You are a brilliant teacher and I love the way you make your code simple enough for a SwiftUI newbie to understand! Thank you a million times!

JohnK
Автор

This is the best Jason explanation on the internet. Thank you for a world class video…bob

bbulliard
Автор

This is literally ten best tutorial on yt. With a bit of adapting its suitable for every usage. Thanks man

wolski
Автор

Hey Meng, really nice tutorial. I’m learning SwiftUI, built an app with static cards and now will use this knowledge in practice and make cards load from API. Thanks a lot for your videos!

olegtitov
Автор

So clear and concise. I have watched so many of videos on this topic and by far yours is the best!

VinceVideoHDk
Автор

I've been looking for a well done tutorial for days. Thanks!

simoneottavianelli
Автор

thank you so much. I have been trying to understand this for weeks, and you have explained it so much more clearly than anyone else!

purpuro
Автор

Awesome, I was trying to do it for hours. Thank you very much for this brilliant video!
Liking, subscribing, learning

rafaafeitos
Автор

Thanks for sharing! Awesome tutorial. I used that with the OpenWeatherMap API and had to remove the [ ] brackets at let posts = try! JSONDecoder().decode([POST].self, from: data!) --> let weatherData = try! JSONDecoder().decode(WeatherData.self, from: data!). With the [ ] brackets, I got an error describing that the decoder wanted to decode an array but received a dictionary. Without the [ ] brackets, my code is running.

Hendrik
Автор

Thanks...that's a lot clear to me on SwiftUI and APIs session

aungphyoe
Автор

Thank Your video filled the missing pieces I needed.

charlesm.
Автор

My app is crashing even after copying exactly the same code. Don't know where the error is

glkrishnakumar
Автор

Hello, in my case i need the list of posts in 5 different view, how do i store the data i got from the url in a list which i can use in several views. Or should i just save it every time i get it with onappear. Please help

valonhyseni
Автор

Great video, how do I get the next part?

mrglwatson
Автор

Do you have a similar video like this using UIKit ?

wensmusic
Автор

Hey, i want to add new items to api. I can do that with offline storage but what about online ? I can use firebase but i want to make my own database, fetch api and add new ones. Any suggestions ?

serdaronurkaradag
Автор

I am using exactly your code and getting this error:

2021-01-17 16:52:13.697259+0100 XYZ[14020:4668295] Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.typeMismatch(Swift.String, [_JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "id", intValue: nil)], debugDescription: "Expected to decode String but found a number instead.", underlyingError: nil)): file XYZ/ContentView.swift, line 24

What is the problem?

aigner
Автор

7:55 the “[Post].self” is tripping me up, what does it mean to have a “.self” on the end (suffix)? (I know “self.” (Prefix) which points to the class itself)

brothercaleb
Автор

Dear DesignCode! I really like the music that plays on the background of your videos! Always wanted to ask, who is the composer?

robertricker
join shbcf.ru