Swift: Generic & Reusable API Calls (2022, Xcode 12, Swift 5) - iOS Development

  Рет қаралды 20,462

iOS Academy

iOS Academy

3 жыл бұрын

In this video we will learn about writing Generic API calls in a reusable fashion. Leveraging generics we can greatly simplify our code and make it highly reusable. We will work with Xcode 12 and Swift 5.
💻 Source Code: / iosacademy
🎥 Subscribe for more: kzfaq.info?su...
😎 Like my teaching style? Check out some of my most popular courses! courses.iosacademy.io
#generics #swift #API
** Like my teaching style? Check out some of my most popular courses!
courses.iosacademy.io
Join this channel to get access to perks, code, groups, and more:
Building Instagram: courses.iosacademy.io/p/build...
Building TikTok: / @iosacademy
SwiftUI for Beginners: ios-academy.teachable.com/p/s...
Join the iOS Academy Community: iosacademy.io/
** Get Skillshare free for 2 Months and learn iOS
www.skillshare.com/r/user/afraz
** Manage all your investments from app earnings on Betterment!
bit.ly/3eBwlI9
** Grow your own KZfaq tech channel with TubeBuddy:
www.tubebuddy.com/iosacademy

Пікірлер: 71
@iOSAcademy
@iOSAcademy 3 жыл бұрын
If you enjoy my teaching style, check out my courses at courses.iosacademy.io/
@vaibhavshiledar8213
@vaibhavshiledar8213 3 жыл бұрын
Please, give me a GitHub repo link
@dodilodi1278
@dodilodi1278 3 жыл бұрын
Hi Afraz, I have been working with Swift and watching Swift related videos since December 2019. Honestly, this is one of the best and most useful videos so far. Please make more videos like this, with themes of reusable code because this is one of the most important things for every programmer, I think. Thanks!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Hey, thanks for the feedback! More coning soon
@reece5863
@reece5863 Жыл бұрын
Work wants this done asap. I don't know what I'm doing. You're my only hope to save my job.
@shawnfrank5303
@shawnfrank5303 3 жыл бұрын
Really nice to see the power of generics. Wondering if you have any previous videos where you talk about generics as the topic is a bit challenging for me to grasp.
@smael1989
@smael1989 3 жыл бұрын
Wow, thanks! That's great! Never used this
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Youre welcone
@acharya-karthikeya
@acharya-karthikeya Жыл бұрын
Simple example. Excellent explanation. Thanks dude.
@iOSAcademy
@iOSAcademy Жыл бұрын
Glad it helped!
@rahularora2936
@rahularora2936 3 жыл бұрын
your a legend. this video helped so much thx
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Youre welcome
@KennyChen0716
@KennyChen0716 3 жыл бұрын
Love your courses, already bought StockAPP Course. Keeping it Up!!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thank you!
@matterologyo_o6842
@matterologyo_o6842 Жыл бұрын
Yu amazing..thnx a lot
@iOSAcademy
@iOSAcademy Жыл бұрын
Youre welcome
@6957-c5k
@6957-c5k Жыл бұрын
Nice video. The SRP part is spot on. Although this video is almost a year old, I noticed you didn’t switch threads from background to main thread.
@djaircostadev
@djaircostadev 2 жыл бұрын
thank...fantastic content
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Thanks
@gastongasquet3594
@gastongasquet3594 2 жыл бұрын
Great tutorial. Isn’t possible to reduce the duplicated code on the fetch method?
@GrandAmericaMotorcycleRides
@GrandAmericaMotorcycleRides 2 жыл бұрын
Fantastic video! Exactly what I was looking for! At 5:30 you are writing the task declaration and remove self from self.dataTask then say this is why we are extending so we don't need a custom class? Can you explain what you mean by that? Is extending only to avoid having to use self?
@rev_kous9275
@rev_kous9275 3 жыл бұрын
Next suggestion: data layer. I think it will be helpful to use them on different view controllers and to have a better scalability to manage data when downloading content and use them. But how to do that, how to implement that ?
@bunnyrabits
@bunnyrabits 3 жыл бұрын
Please make a video on how to make secure api calls. Like encrypt data before in the request etc.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Sure
@dhikaaditya1920
@dhikaaditya1920 2 жыл бұрын
Nice video! Because of you now my knowledge is updated hahaha. Oh yea. Btw can you make another video related to Networking again like reusable API for post method(add data to database). I'm the first if you upload for post method. Thank you very much, Bless u
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Thanks
@ProductsHub365
@ProductsHub365 2 жыл бұрын
is generic api call helps in displaying different service calls on same viewcontroller at the same time ???? without any flaws?
@eldersonlaborit2290
@eldersonlaborit2290 3 жыл бұрын
hi awesome channel, i want to know, do you have any resource about maps with swift or swiftUI? thanks.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks! Yes, search maps on the channwl & youll find losds of videos
@jesseyates4473
@jesseyates4473 3 жыл бұрын
Can you do a video on web scraping API like for Xcode? Not many KZfaqrs like yourself have videos dedicated to the topic. Plus having you do it means only quality results as your videos leave no stone unturned on how to do Xcodes. ps, keep up the good work we all love it.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Sure! And thanks
@jesseyates4473
@jesseyates4473 3 жыл бұрын
@@iOSAcademy thanks that’s great I want to figure out how to do use a web scraping API for finding press releases companies or political parties and have it appear to users on Xcode. Maybe even what types of Web Scraping API is out there for the price range.
@m3ezzz
@m3ezzz 3 жыл бұрын
Please make a tutorial for an app utilising dotnet graphql data
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Coming soon
@raychen4458
@raychen4458 3 жыл бұрын
Hello sir how does this approach differentiate from using Alamofire ? Do you think this way is more convenient to use ?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Alamofire is a lib
@obinnaaguwa
@obinnaaguwa 3 жыл бұрын
Nice tutorial Boss. can you create an app that can use Apollo GraphQL client to fetch data. Thanks Boss.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks and Yes I can
@Portles
@Portles 3 жыл бұрын
Hi can you show how can I send authorization key in this structure?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Sure thing
@markaurelius61
@markaurelius61 3 жыл бұрын
So, you are not moving on to async await yet?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Nope, too new. Waiting for Xcode 13 to be out of beta
@AmitBiswastunebox
@AmitBiswastunebox Жыл бұрын
Fantastic content. Hi Afraz why don’t you publish new content ? Seems like you are busy now a days. Good luck ! Waiting for something new! 🎉❤
@AW-gj4ji
@AW-gj4ji 3 жыл бұрын
This doesn't seem to work for a dictionary. Would anyone know what changes are needed for it?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
It should work for all types
@AW-gj4ji
@AW-gj4ji 3 жыл бұрын
@@iOSAcademy I encountered this error while running the same code(but for a different api call).
@imofo
@imofo 3 жыл бұрын
can you make movie app tutorial pls :3
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Sure
@1988ferry
@1988ferry 3 жыл бұрын
I am here before 1 mil views
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Youre the real MVP
@1988ferry
@1988ferry 3 жыл бұрын
@@iOSAcademy No, you are the MVP, I learned a lot from your channel
@jaylensmith6308
@jaylensmith6308 Жыл бұрын
I feel like the models property is overkill lol. Great video though
@iOSAcademy
@iOSAcademy Жыл бұрын
Thanks
@alirezasoltanineshan2974
@alirezasoltanineshan2974 3 жыл бұрын
Hi, you are great, but you are super fast in coding as learning section, if you can be slow in your coding, it will be amazing!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks for the feedback
@run4ever102
@run4ever102 Жыл бұрын
Hey man... normally like your content but this flew by and I really didn't learn anything. Warning for those watching this is for advanced users who are able to type REALLY fast.
@iOSAcademy
@iOSAcademy Жыл бұрын
Thanks for the feedback
@adamshernandez1973
@adamshernandez1973 3 жыл бұрын
First!! Lol
@iOSAcademy
@iOSAcademy 3 жыл бұрын
First reply!
@jaylensmith6308
@jaylensmith6308 Жыл бұрын
Well I feel l have wasted my time recreating different methods…
@nicolaechivriga4683
@nicolaechivriga4683 Жыл бұрын
Can you speak slower please , you are doing everything so fast , I thought this is learning section but it looks like reminder section:D , thank you!
@iOSAcademy
@iOSAcademy Жыл бұрын
I will try my best
@Derplerplarry
@Derplerplarry Жыл бұрын
You need to stop doing all this in a viewController its not good practice or what is used in the real world
Iron Chin ✅ Isaih made this look too easy
00:13
Power Slap
Рет қаралды 35 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 168 МЛН
How To Work With Any API (API Tutorial using URL Requests)
27:07
CodeWithChris
Рет қаралды 124 М.
Debugging in Xcode 13: Tips & Tricks (2022) - iOS
14:02
iOS Academy
Рет қаралды 42 М.
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
Swift: WebSocket Real-Time Data Introduction (2022, iOS, Xcode 13)
16:08
Swift for Beginners: Generics - 2020 (Xcode 11, iOS)
19:04
iOS Academy
Рет қаралды 10 М.
Swift - Result Type - Cleaner Network Calls
12:07
Sean Allen
Рет қаралды 20 М.