iOS Swift Tutorial: Use Web APIs and JSON Data with Swift 5

  Рет қаралды 92,332

Brian Advent

Brian Advent

Күн бұрын

Learn how to access and get data from Web APIs in JSON format and build a cool holidays app.
We are using the Calendarific API. So get your API key here:
calendarific.c...
➡️ Tutorial Files: / xcode-project-5-29478079
🛒 GAME DEVELOPMENT COURSE - JUST $20 🛒
www.udemy.com/...
👏 Support me on Patreon: / brianadvent
➡️ Web: www.brianadvent...
✉️ COMMENTS ✉️
If you have questions about the video or Cocoa programming, please comment below.

Пікірлер: 70
@kevinbenavides92
@kevinbenavides92 4 жыл бұрын
Great tutorial. I like that you demonstrated encapsulation of the network request.
@rasty_habibi
@rasty_habibi 2 жыл бұрын
This is such an excellent tutorial. Great job explaining the awesome tools + methods built into Swift. Thank you Brian.
@traviss7740
@traviss7740 4 жыл бұрын
This was incredibly useful. I'll be watching these from now on for learning. Quick and to the point.
@Patrick462
@Patrick462 4 жыл бұрын
Great tutorial, very helpful! I appreciate how you focused on the topic and did not ramble off on tangential issues (as many tutorials do).
@michaelt9241
@michaelt9241 3 жыл бұрын
Thanks for this video! I had been searching how to parse JSON successfully from a GET request for a while.
@swaimcs9827
@swaimcs9827 Жыл бұрын
Knowledge full video
@mohammedsulaiman5126
@mohammedsulaiman5126 4 жыл бұрын
Hey Brain Thank u so much It helps!!! Make tutorials more on this topic Thanks in advance!
@elenekotu
@elenekotu 5 жыл бұрын
Bad idea to show your app key with all these trolls on internet 😂 nice video!
@prosyarceno6607
@prosyarceno6607 5 жыл бұрын
Is it that dangerous considering it's only a tutorial with some sample data readily available on the net?
@elenekotu
@elenekotu 4 жыл бұрын
I know guys, it was just a joke comment
@shabba194
@shabba194 4 жыл бұрын
I enjoy you content. Straight to the point and easy to follow
@dk-sky3820
@dk-sky3820 5 жыл бұрын
This is a great tutorial. Thank you. I wish more tutors would stop using storyboards though 😑
@peronawu9265
@peronawu9265 4 жыл бұрын
Just wanna say thank you, Brian, this tutorial helps me a lot.
@josiahrininger
@josiahrininger 5 жыл бұрын
Very clean way of handling your API request!🙌🏻
@lycansre
@lycansre 3 жыл бұрын
your tutorial is amazing. Good job and a nice effort.
@iOSTechie
@iOSTechie 5 жыл бұрын
Thank you so much Brian for such a great video. 😊👍 Can you please make a video where you can show us how to do API calls like get post delete upload in iOS. Love your channel
@rukimakino2533
@rukimakino2533 2 жыл бұрын
Oh this helps a lot !!! Thanks !!!
@thorstengonschior5603
@thorstengonschior5603 4 жыл бұрын
Hey Brian, thx a lot! Adapted the request method it into my own project and it worked right away :)
@1358raha
@1358raha Жыл бұрын
great point . thanks a lot ... you save my days bro ... I'm new in swift codes and I want to scrap data from a website that I have not json data in my result . how I can get api-key of this website ? is another way to get API s a websites we need their data ?
@yrist12
@yrist12 5 жыл бұрын
You can use Postman to make requests with any type of parameters and get cool printed JSON in response. Also use QuickType to convert JSON text to swift codable model
@agustino.4325
@agustino.4325 4 жыл бұрын
Thanks a lot for the QuickType discovery, hadn't heard of it, but I can see myself using a lot from now on!!
@AshlandTrades
@AshlandTrades 5 жыл бұрын
Hi Brian, Do you have the source code for this project? I cant seem to figure out what I'm getting wrong
@linusb212
@linusb212 3 жыл бұрын
This is a great tutorial! I am struggling to understand the escaping completion handler of the request function. Can you offer any feedback to explain the high level logic of that code?
@JohnKitching1963
@JohnKitching1963 4 жыл бұрын
Great work Brian. Can you talk us through the steps to get to your starting point please? I've tried a few ways but never get a tableviewcontroller in the swift file. I'm using Xcode 11
@ZAP1able
@ZAP1able 5 жыл бұрын
We are waiting for Post method 🙏🏻
@konig231
@konig231 5 жыл бұрын
amazing tut bro!
@exalandconcept
@exalandconcept 5 жыл бұрын
Very great Tutorial , clear and very well explained
@andronisaev
@andronisaev 4 жыл бұрын
Thank you very much for a great video! So useful and easy to understand! Could you please explain why you did not use [weak self] when updating tableView in didSet?
@priyankamistry2168
@priyankamistry2168 4 жыл бұрын
Nice tutorial. How can we store this json data directly to core data using codable and access it?
@oisbelsimpsonverdecia9458
@oisbelsimpsonverdecia9458 4 жыл бұрын
Hello. Can you do a video about GET or POST request to an API that the server require Basic Auth in Swift 5. There is some info about a delegate implement authentication challenge but is not clear. Thank you in advance.
@edmfestivals6066
@edmfestivals6066 4 жыл бұрын
goddamn swift makes you do alot just to send a request
@alcprado
@alcprado 5 жыл бұрын
Awesome tutorial, Brian!
@Borelzin_
@Borelzin_ 4 жыл бұрын
Thanks man, helped me a lot!!
@truthbetold5460
@truthbetold5460 3 жыл бұрын
Well explained
@faustogomez7731
@faustogomez7731 4 жыл бұрын
Good video, it helped me a lot.
@Ivan_Maslov
@Ivan_Maslov 3 жыл бұрын
Hello! Could you tell me why did you update holidays list on main thread? As far as I know, the property is already located on the main thread, since it initializes after applicationDidFinishLaunch
@yrist12
@yrist12 5 жыл бұрын
You should to cancel dataTask before make new one. Because new task can be responded faster than old one and you will see old results
@GG-hk5iz
@GG-hk5iz 4 жыл бұрын
SWEET AND SIMPLE
@glennmiller394
@glennmiller394 2 жыл бұрын
I couldn't find the rested app. Is it still available?
@Andy-vc8ir
@Andy-vc8ir 4 жыл бұрын
If I want to request json from multiple different URL's using the same API key, do I need to implement a separate request per URL?
@hansholzbein1
@hansholzbein1 4 жыл бұрын
thanks bro
@princemoronfolu
@princemoronfolu 4 жыл бұрын
Hey Brian, i don't think the searchBarButtonClicked is firing.
@HarvMasterJay
@HarvMasterJay 4 жыл бұрын
Hey Bolaji, did you find a fix for this? I think I'm having the same issue as you
@princemoronfolu
@princemoronfolu 4 жыл бұрын
@@HarvMasterJay i used func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { it fires every time text changes but at least it works.
@HarvMasterJay
@HarvMasterJay 4 жыл бұрын
Awesome man and thanks! Take care!
@bruhrnav
@bruhrnav 4 жыл бұрын
Why is there a 'women' search on your Rested?
@joshkinney5091
@joshkinney5091 5 жыл бұрын
can you explain the [weak self] @ 27:00 ?
@FilipKrzyz
@FilipKrzyz 5 жыл бұрын
I also don't understand necessity for it here
@GeraldBrigen
@GeraldBrigen 4 жыл бұрын
Is used to prevent retain cycles, check this article it explains it in greater details www.avanderlee.com/swift/weak-self/.
@ettoremonteleone1455
@ettoremonteleone1455 4 жыл бұрын
I have got this error: Member 'success' in 'Result' produces result of type 'Result'
@pavanrao5896
@pavanrao5896 4 жыл бұрын
Hey, did you overcome this issue? I'm facing the same problem
@Scheisseistnass
@Scheisseistnass 4 жыл бұрын
Same
@TheHonest49
@TheHonest49 4 жыл бұрын
@@Scheisseistnass Did you find a solution of this problem?
@ettoremonteleone1455
@ettoremonteleone1455 4 жыл бұрын
@@pavanrao5896 y man
@ettoremonteleone1455
@ettoremonteleone1455 4 жыл бұрын
@@TheHonest49 y man
@jeffreylee911
@jeffreylee911 4 жыл бұрын
I did exactly what you did, but I got a "canNotProcessData" error......
@GeraldBrigen
@GeraldBrigen 4 жыл бұрын
I was experiencing the same error, the issue might be your model keys are not matching those from the API, I created a gist you can compare to see where you went wrong gist.github.com/gbrigens/71e29f2a40178870188500dc3d023c7d.
@saunderstech7430
@saunderstech7430 3 жыл бұрын
how can I get the files
@9988khan
@9988khan 5 жыл бұрын
plz give Link of project source
@joshkinney5091
@joshkinney5091 5 жыл бұрын
not exactly the same code. the look is a bit different and some names have been changed. but overall its the same code and it is working. github.com/jbird84/HolidaysUsingAPIs
@rajatkotian8887
@rajatkotian8887 5 жыл бұрын
Does this mapping technique work with any api's we work with?? Anyone can ans please..
@BrianAdvent
@BrianAdvent 5 жыл бұрын
Sure, but you will have to adapt the data model to the api you are using
@rajatkotian8887
@rajatkotian8887 5 жыл бұрын
@@BrianAdvent Okay thanks Brian... Great content!
@platin2148
@platin2148 5 жыл бұрын
749ms off response time man thats pretty bad wouldn't use such a slow service.
@kevinolive
@kevinolive 4 жыл бұрын
I don't fully understand all the code produced, but I found this to be very helpful in trying to create proper structs for JSON output: app.quicktype.io/
@edgar11605
@edgar11605 4 жыл бұрын
26:39
@tanvirgeek7054
@tanvirgeek7054 4 жыл бұрын
You are being lazy. Make complete tutorials not partial.
What is JSON - JSON Parsing in Swift
24:15
CodeWithChris
Рет қаралды 74 М.
Parsing JSON Just Became Super Easy in Swift 4 with Decodable
19:30
Lets Build That App
Рет қаралды 274 М.
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 32 МЛН
DID A VAMPIRE BECOME A DOG FOR A HUMAN? 😳😳😳
00:56
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 55 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
iOS Swift 5 Tutorial: Make HTTP POST Requests to an API
18:21
Brian Advent
Рет қаралды 60 М.
How To Work With Any API (API Tutorial using URL Requests)
27:07
CodeWithChris
Рет қаралды 125 М.
I run untested, viewer-submitted code on my 500-LED christmas tree.
45:17
Fetch Data from JSON API into SwiftData Database
32:27
azamsharp
Рет қаралды 2,7 М.
Top 5 ChatGPT Use Cases for Professionals!
10:48
Jeff Su
Рет қаралды 62 М.
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 32 МЛН