Swift: Combine Basics & Intro (2023, Xcode 12, Swift 5) - iOS Development

  Переглядів 62,969

iOS Academy

iOS Academy

3 роки тому

In this video we will learn about the basics of the Apple Combine framework with swift and iOS. Combine is Apple's own reactive data framework similar to RxSwift and Redux. Its useful and especially interesting to integrate with SwiftUI.
💻 Source Code: / iosacademy
🎥 Subscribe for more: ukposts.info?su...
😎 Like my teaching style? Check out some of my most popular courses! courses.iosacademy.io
#swift #combine #basics
** Like my teaching style? Check out some of my most popular courses!
ios-academy.teachable.com/p/b...
Join this channel to get access to perks, code, groups, and more:
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 UKposts tech channel with TubeBuddy:
www.tubebuddy.com/iosacademy

КОМЕНТАРІ: 92
@iOSAcademy
@iOSAcademy 3 роки тому
If you like my teaching style, I've started creating my own courses here that you may like! courses.iosacademy.io/
@davidstreet9419
@davidstreet9419 3 роки тому
Could you create a tutorial on implementing UISegmentedControl via UICollectionViews?
@iOSAcademy
@iOSAcademy 2 роки тому
@@AvantjerTube hey Jerry, I appreciate the feedback. Ill keep in mind to slow down as I create more content. All the best.
@hashankannangara8723
@hashankannangara8723 3 роки тому
Please do more videos about Combine framework ❤️
@iOSAcademy
@iOSAcademy 3 роки тому
Will do
@ryanwesley2006
@ryanwesley2006 3 роки тому
honestly been waiting for someone to do a "basic" tutorial on Combine... after watching this video I will still be waiting. I appreciate anyone's effort to teach information for free so thank you. Unfortunately, this isn't basic. The assumption is knowing nothing about combine and then you code like a person should know what Cancellable and Sink are without explaining it and why/how they get used. I am as lost watching this as I am with the paid courses from Mohammad Azam or Ray Wenderlich. Sigh. Appreciate the effort though.
@iOSAcademy
@iOSAcademy 3 роки тому
thanks for the feedback
@tbg6nb
@tbg6nb 2 роки тому
This is a basic tutorial, a table view with buttons which print something to the console is like the "hello world" task of the iOS programming. There is no need to understand every single method / operator in depth, just analyze the example code and you can get the idea of it
@AviramNetanel
@AviramNetanel Рік тому
I lost him too there :P
@captainmichaelj2321
@captainmichaelj2321 2 роки тому
Always love his tutorials, he helped us to digest and organize Combine concepts in understandable and demonstrable manner.
@mrVytautasS
@mrVytautasS Рік тому
Excellent video. Love that this is explained in a real world scenario rather than playgrounds, which I find harder to understand.
@TephrosXI
@TephrosXI Рік тому
Yes, would love to see more Combine examples! Thank you!
@GarethHall
@GarethHall 2 роки тому
Trying to my hardest to understand what the advantages are. This just seems more cumbersome and messy, e.g. keeping an array of observers. I’m sure and believe this probably is the future, but it just hasn’t clicked yet why this is better. Would love to see a direct comparison of implementing something with and without combine, then walk and talk through why each component of doing it via combine is better.
@trendz4422
@trendz4422 2 роки тому
Yes, We could easily handle button taps just by creating variable with type as Function. and just by calling cell.onButtonTapped = { [weak self] in print("tapped" )}. I didn't get why should I migrate to combine to add these additional boilerplate codes
@arkemal
@arkemal Рік тому
imperative vs declarative
@KitsuneSoftware
@KitsuneSoftware 2 місяці тому
Agreed. The argument for them appears to be "we don't like closures, so… lets make a new API which has two closures and also requires an extra local property". Why bother?
@nurlanakylbekov7266
@nurlanakylbekov7266 3 роки тому
Waiting for. Waiting for not playground explanation and examples, waiting for real project examples)) for example how to subscribe or observe (I still can’t understand what for what) some ui elements, if change something in VC1 it will be affected on VC2. In general I have task that I have to update data in my music app. PlayerVC will be dismissed but I want still update artImage, song name, artistName to be updated in ListVC when music has changed.
@se7enzz258
@se7enzz258 3 роки тому
waiting for this video for a long time.❤️ Hope to see more videos about Combine Framework.
@iOSAcademy
@iOSAcademy 3 роки тому
Coming soon
@chesterman18g
@chesterman18g 3 роки тому
thanks for the nice and easy to understand intro!
@iOSAcademy
@iOSAcademy 3 роки тому
Youre welcome
@nurlanakylbekov7266
@nurlanakylbekov7266 3 роки тому
1) Can we use PassthroughSubject to Bool isSelected of CellView? Is it possible to assign Model object to action instead of String and print value of Object with indexPath?
@trendz4422
@trendz4422 2 роки тому
We could easily handle button taps just by creating variable with type as Function. and just by calling cell.onButtonTapped = { [weak self] in print("tapped" )}. I didn't understand why should I migrate to combine to add these additional boilerplate codes.
@mahmoudabdelwahab1015
@mahmoudabdelwahab1015 3 роки тому
Waiting for your awesome explanation Man 😍❤️
@iOSAcademy
@iOSAcademy 3 роки тому
Thanks
@BABEENGINEER
@BABEENGINEER 2 роки тому
I love the explanations. Really helpful!
@iOSAcademy
@iOSAcademy 2 роки тому
Thank you!
@hiteshagarwal5199
@hiteshagarwal5199 2 роки тому
Thank you for this video. It is very helpful. I have a doubt that why we should use combine instead of delegate or closure approach. What problem of delegation and closure is solved by combine. passthrough object seems like a closure but with extra functionality. if we think it in reverse order that is delegate or closure is solution of complexity of combine then it is right.
@sahebroy4678
@sahebroy4678 Рік тому
2 questions - 1. Whats the purpose of making a AnyCancellable object and using sink, when we can do that using normal closures. 2. Whats the purpose of using Passthrough object in a cell, when again this can be achieved by a normal closure. Am I missing something or this is just a closure with new syntactic sugar?
@navr3505
@navr3505 Рік тому
yes same for me, feeling confused, Future is nothing but @escaping in closure and Passthrough what ever shit that is, is again similar to what we do using closure completionhandlers, no idea why I should be using this
@eray9280
@eray9280 2 роки тому
You rock dude. Keep going!
@iOSAcademy
@iOSAcademy 2 роки тому
Thank you!
@sondoskannous3306
@sondoskannous3306 Рік тому
best video about combine, easy and clear, thank you
@iOSAcademy
@iOSAcademy Рік тому
Glad it was helpful!
@hashankannangara8723
@hashankannangara8723 3 роки тому
Waiting for video like this...❤️
@iOSAcademy
@iOSAcademy 3 роки тому
Get pumped
@followerOfJesus723
@followerOfJesus723 Рік тому
Please do more Reactive Programming!
@nemanja7901
@nemanja7901 11 місяців тому
In a 4th minute, what did you type for a shortcut for a func? Thanks
@valentine1925
@valentine1925 2 роки тому
you sound like the guy from new boston tutorials. Awesome tuts btw, that deserves a thumbs up
@iOSAcademy
@iOSAcademy 2 роки тому
Thanks!
@raychen4458
@raychen4458 2 роки тому
There is some crazy shit going on here Please do more sir, you are the best
@iOSAcademy
@iOSAcademy 2 роки тому
Thanks
@YashSharma-qo1sy
@YashSharma-qo1sy Рік тому
I have learnt basic Swift and done GCD and Operations Queue not touched UI yet but i have been ordered to complete basics of Combine Framework and I am not getting anything in this as well as any other video. Can anyone guide what should i learn first, like what should be the order of learning. I don't even know what is viewcontroller in Swift, but i am confused weather I should learn viewController directly or is there something that i should know in prior to this.
@nurlanakylbekov7266
@nurlanakylbekov7266 3 роки тому
10: 15 - Can we have more about memory leaks? I often use self.myModel = result or self.myModel.append(result), then self.collectionView.reloadData or tblView.reloadData. I never used [weak self]. What does it give? Thank you🙏
@roh9934
@roh9934 Рік тому
Read about scenarios when memory leaks happen, you will know.
@AkimboFennec
@AkimboFennec 4 місяці тому
Did the new Observable framework substitute combine ?
@Eugene.Berezin
@Eugene.Berezin 3 роки тому
Thank you
@iOSAcademy
@iOSAcademy 3 роки тому
Youre welcome
@KanyantaMubanga
@KanyantaMubanga 2 роки тому
I like the way you say "cell"
@iOSAcademy
@iOSAcademy 2 роки тому
Haha thanks
@arkemal
@arkemal Рік тому
thank you
@iOSAcademy
@iOSAcademy Рік тому
You're welcome
@abdalrahmanaboujeeb1049
@abdalrahmanaboujeeb1049 2 роки тому
Actually I have expected more from Combine as reactive framework, Rx handles data easier and the code is more neat. And you don't have to actually reload data when you're using Rx while you need to do it while using Combine. Can we have a video comparing both frameworks with pros and cons? Your videos are always easy to explain so I would appreciate more contents about Rx frameworks on how to handle variables instead of tableviews or collectionviews. Thanks.
@reece5863
@reece5863 Рік тому
You put the cell on the same page as the ViewController? He's a madman I say. A MADMAN!!!
@ANILKUMAR-vv1fz
@ANILKUMAR-vv1fz 3 роки тому
Awesome Video
@iOSAcademy
@iOSAcademy 3 роки тому
Thanks!
@Kayzer606
@Kayzer606 10 місяців тому
@iOSAcademy bro, the link to the source code is wrong and I also wasn't able to find it in your Git repo. Could u pls add it?
@jeffrysandypurnomo5558
@jeffrysandypurnomo5558 3 роки тому
Yess i really interest in combine, actually i didnt really well knowledge about delegate pattern also, but that generic things and .store .sink is interesting also. maybe i will learn about delegate pattern, then get back here to learn that combine for rxswift if im not mistaken, thankyou so muchh
@iOSAcademy
@iOSAcademy 3 роки тому
your welcome
@Ipat639
@Ipat639 2 роки тому
Do we need combine after async/await coming?
@iOSAcademy
@iOSAcademy 2 роки тому
They offer different features
@laurj00
@laurj00 Місяць тому
Where can I get the code for this example ?
@user-yd9xy3rb4x
@user-yd9xy3rb4x 3 роки тому
I’ve just realized that there aren’t videos on main frameworks for Swift on UKposts. You can be the first one to make 😊
@davidstreet9419
@davidstreet9419 3 роки тому
You're a master, a genius. Thanks for all of the incredible content! Nice audio improvement btw!
@iOSAcademy
@iOSAcademy 3 роки тому
Youre welcome
@felixtube71
@felixtube71 8 днів тому
I like how you use combine for the server call but i'd rather use a weak ref closure for the tap as a var instead for cell so i don't have to create that extra array of observables for each cell. just a weak closure that passes back a string value would be less overhead. This if fine just my pref
@felixtube71
@felixtube71 8 днів тому
also since this is a tutorial on combine i get it. just throwin in 2 cents years later :-)
@user-tq4fv8ie6q
@user-tq4fv8ie6q 3 роки тому
i love your new mic Afraz. what's the make?
@iOSAcademy
@iOSAcademy 3 роки тому
Thanks, its a yeti
@nitinbhatia493
@nitinbhatia493 Рік тому
Show some api data handler without future just with anypublisher generic please.
@iOSAcademy
@iOSAcademy Рік тому
Added to list
@MoAdel92
@MoAdel92 3 роки тому
Please organize the videos to playlist
@iOSAcademy
@iOSAcademy 3 роки тому
Will do
@rev_kous9275
@rev_kous9275 3 роки тому
I’m waiting for the equivalent: RxSwift.
@iOSAcademy
@iOSAcademy 3 роки тому
Coming soon
@motexdevelopers1123
@motexdevelopers1123 3 роки тому
Me 2 bro
@rev_kous9275
@rev_kous9275 3 роки тому
@@motexdevelopers1123 RxSwift is one of the most demanded skill for iOS developer jobs.
@motexdevelopers1123
@motexdevelopers1123 3 роки тому
@@rev_kous9275 sure btw its work with under ios versions combine just for 13+
@rev_kous9275
@rev_kous9275 3 роки тому
@@motexdevelopers1123 Also, MVVM pattern suits best for reactive programming.
@monstrositylabs
@monstrositylabs Рік тому
Skip the boiler plate ukposts.info/have/v-deo/oJKKZYGLgGaYmGQ.html
@iOSAcademy
@iOSAcademy Рік тому
Thanks for the feedback
@RostyslavKobizsky
@RostyslavKobizsky 2 роки тому
Combine is cool, but UIKit, dude! :D it's 2021, come on!
@iOSAcademy
@iOSAcademy 2 роки тому
Haha thanks
@3ilz
@3ilz Рік тому
you didn't really explain what any of these combine subscribers do or how they work..
@cibo1762
@cibo1762 Рік тому
I appreciate the effort but this is not a good video. 80% of the video is typing some UIKit code...and the combine part is not really well explained.
@guyincognito5663
@guyincognito5663 Рік тому
I’m sorry, where tf are “the basics”? It’s just a dump of new terms, none explained… I know less after watching this.
@bruhmoment3731
@bruhmoment3731 3 роки тому
to be honest, i don't understand what you're saying at all
@iOSAcademy
@iOSAcademy 3 роки тому
Thanks for the feedback
@EmanresuThe
@EmanresuThe Рік тому
Don't bother. Not really a useful intro to Combine. Half the video is spent on typing UIKit code. On top of this sink is not even explained.
@Alperic27
@Alperic27 2 роки тому
Man … i cant stand your tone … and the contents is not much better .. i’m gonna perhaps go ahead and forget you exist… and no worries, i did go ahead and told yt to go ahead and stop to go ahead and suggest your vids 🙂
RxSwift Basics & Intro (2023, Xcode 12, Swift 5) - iOS for Beginners
13:41
Migrating to Combine
22:51
Kilo Loco
Переглядів 19 тис.
Swinject: Effortless Dependency Injection in iOS (Basics)
12:45
iOS Academy
Переглядів 27 тис.
Swift: Dependency Injection Tutorial (2022) - iOS
24:31
iOS Academy
Переглядів 34 тис.
Combine. Введение в фреймворк
21:46
SwiftBook
Переглядів 14 тис.
Prefetching with TableViews (2022) - iOS
16:35
iOS Academy
Переглядів 18 тис.
SwiftUI - Intro to MVVM | Example Refactor | Model View ViewModel
11:55
Memory Leaks in iOS: Find, Diagnose, & Fix (2022)
12:44
iOS Academy
Переглядів 44 тис.