Тёмный

Migrating to Combine 

Kilo Loco
Подписаться 37 тыс.
Просмотров 20 тыс.
50% 1

Kilo Loco goes over the basics of Apple's reactive framework Combine and how you can migrate from using delegates and callbacks, to using Futures and PassthroughSubjects.
** Show Notes and Links **
Project Files:
github.com/Kil...
Kilo Loco on Social Media:
www.kiloloco.com
RU-vid - / kiloloco
Twitter - / kilo_loco
Instagram - / kilo_loco
#Iosdev #swiftlang #combine

Опубликовано:

 

12 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 91   
@rickywitherspoon2861
@rickywitherspoon2861 3 года назад
One important thing to be aware of is that the pass through subject will stop sending values if it fails. In this case it never does so it’s fine, however if for some reason you send a error, you won’t receive anymore values.
@Kilo_Loco
@Kilo_Loco 3 года назад
Great call out! I forgot to include an example of that in this tutorial, but that’s an important thing to know when working with pass through subjects and publishers in general
@rickywitherspoon2861
@rickywitherspoon2861 3 года назад
@@Kilo_Loco Yeah. I ran into this issue the other day. I was wondering why my button had stopped working all of a sudden. It can be really tricky if you aren't too familiar with combine.
@jeraldo4571
@jeraldo4571 3 года назад
What would be the alternative to a PassthroughSubject in that case?
@evgeniyp1976
@evgeniyp1976 Год назад
WORKAROUND: USE Never failable PassthroughSubject Change from: PassthroughSubject to: PassthroughSubject and there unwrap lets say result/future
@tonysameh
@tonysameh 3 года назад
The best thing about this video is that it describes `Combine` separately without coupling it with `SwiftUI`
@jeraldo4571
@jeraldo4571 3 года назад
Another great tutorial! Hoping to see an MVVM+Combine+UIKit in your channel.
@sami790311
@sami790311 3 года назад
I hope to see that too!
@shikhabudhiraja7084
@shikhabudhiraja7084 2 года назад
@Kilo loco , it would be great if you can create MVVM + 2 WAY BINDING using combine.
@behnamr8274
@behnamr8274 2 года назад
The best channel i ever seen in swift tutorials
@yogeshbhatt3806
@yogeshbhatt3806 Год назад
Thanks for such great video for combine… First time I understood Combine very well…
@Timisenman
@Timisenman 3 года назад
Insanely helpful. I have specifically been preparing my self to do exactly this for my app. Thank you so much for making this, man. Life saver.
@Kilo_Loco
@Kilo_Loco 3 года назад
Haha glad you found it helpful 😁
@slash0t5
@slash0t5 3 года назад
Excellent explanation. Combine is fantastic. No need for 3rd party library. It's clean and with guys like Kilo, you get a smooth entry into a topic that can get complex quite fast.
@davidhughes9320
@davidhughes9320 3 года назад
Nice video. I have seen lots of videos on using URLSession with Combine and SwiftUI, but it is also nice seeing Combine used with UIKit and other practical uses like PassthroughSubject. Most real world apps won't be using SwiftUI for a while yet so it is nice to be able to make UIKit more reactive without having to pull in a big third party library like RxSwift.
@pad8941
@pad8941 2 года назад
You make this concept far more easier to understand, Thanks
@barclaysd
@barclaysd 3 года назад
One of the best videos on getting started with Combine out there - thanks Kilo!
@ix901x
@ix901x 3 года назад
This video is the best video about Comine you will find Thank you kilo !! I did watch a lot of videos about Comine . I read a lot of articles but always they forced on the subject and what is Comine ! but their example was not understandable. and what they do is make you confused ! But this video is something else , it had a very good example , I understand it 100% now !
@roh9934
@roh9934 Год назад
I would rate this video best one to learn combine framework. However, the pre requisites is to know reactive programming. For that, I would suggest those interested to watch "Intro to Reactive Programming by Jordan Jozwiak" on RU-vid.
@glennadams7047
@glennadams7047 3 года назад
Informative presentation. I've been interested in Combine. Thanks Kilo !!!
@Kilo_Loco
@Kilo_Loco 3 года назад
Always a pleasure 😁
@hotskyakash
@hotskyakash 2 года назад
Wow excellent walkthrough 👍thanks for creating it
@avazbekolimov5739
@avazbekolimov5739 Год назад
i want to thank you, I really appreciate your work. All things are understandable and nit. Also BIG thanks for sharing source code 🔥
@tibettenballs4962
@tibettenballs4962 2 года назад
what a fantastic explaination. thx sister loko
@TheAhmadReza
@TheAhmadReza 3 года назад
Awesome Tutorial! Thanks!
@Solidcreating
@Solidcreating 3 года назад
Best presentation on combine for novice ever :) and nice voice! thank you!
@Kilo_Loco
@Kilo_Loco 3 года назад
I’m glad you found it easy to understand 😃
@unnikrishnanc6035
@unnikrishnanc6035 2 года назад
Thanks Kilo.. It was really helpful tutorial and explained everything beautifully .❤️
@narendrasatpute1443
@narendrasatpute1443 3 года назад
Love it !! , I like the way you present, Very helpful 👍
@dhavalnena7386
@dhavalnena7386 3 года назад
21:51 true gem here! It helped! Thanks Kilo.... Bammmm...!
@Efrastan
@Efrastan 3 года назад
Awesome video!
@max500k
@max500k 2 года назад
Awesome tutorial as usual, well done!
@carlosalcala6007
@carlosalcala6007 3 года назад
Best Combine Tutorial Ever !
@Kilo_Loco
@Kilo_Loco 3 года назад
Haha! Happy to hear that 😆
@rasheshbosamiya1482
@rasheshbosamiya1482 3 года назад
Excellent way of teaching!
@dev_jeongdaeri
@dev_jeongdaeri 3 года назад
Super amazing! 🤩👍👍👍
@Kilo_Loco
@Kilo_Loco 3 года назад
Thanks! 😁
@tiam303
@tiam303 3 года назад
If the tableview starts reusing the same animalCell multiple times, I think its actionPublisher will send its value to multiple subscribers. If that's the case, one solution could be to keep a strong reference to the cancellable token inside the cell and then set it to nil inside the cell's prepareForReuse() method.
@Kilo_Loco
@Kilo_Loco 3 года назад
That’s a good call out and work around. Thanks for sharing 👍🏽
@GetSwifty
@GetSwifty 3 года назад
Awesome tutorial. Nice and clean. What mac are you using?
@multitudes389
@multitudes389 3 года назад
don't understand everything about combine yet but looks beautiful!
@toastrecon
@toastrecon 3 года назад
Paid in equity. Lol. I like it. Minimalist. Conforms to Apple’s style guide.
@Kilo_Loco
@Kilo_Loco 3 года назад
Lol im glad someone caught that 😂
@shawnfrank5303
@shawnfrank5303 2 года назад
Wonderful tutorial, explains a complex topic in a very easy, down to earth way. Only question I have leaving this is what is the benefit / motivation to use this ? To me it does not necessarily reduce the code base or complexity.
@Prashant-7
@Prashant-7 3 года назад
Wow very helpful thanks
@Kilo_Loco
@Kilo_Loco 3 года назад
Happy you found it helpful 😃
@blackadder35235
@blackadder35235 3 года назад
Fantastic tutorial, thank you!
@tiojoe_
@tiojoe_ 3 года назад
Another great pearl! Thanks!
@Kilo_Loco
@Kilo_Loco 3 года назад
I'm tryna make a necklace 😉
@temokaxniashvili2375
@temokaxniashvili2375 3 года назад
Another Awesome Video. Thanks ❤️❤️
@Kilo_Loco
@Kilo_Loco 3 года назад
Glad you liked it ☺️
@melAncHOLY_MAN
@melAncHOLY_MAN 3 года назад
Great Tutorial! What happens to the Set of AnyCancable? Do you have to clean it up somehow, some time? I mean, you are storing and storing objects in it, and never clean it up. So you keep a reference to the objects and never release it
@eichenherzmo
@eichenherzmo 3 года назад
I think you can cancel it in your deinit
@melAncHOLY_MAN
@melAncHOLY_MAN 3 года назад
@@eichenherzmo I did read that the Set will get deallocated when the viewController will be deallocated
@paulancajima
@paulancajima 3 года назад
Thanks a lot !
@NPCTE23
@NPCTE23 3 года назад
You green screen game is tight! Thanks for the tutorial!
@Kilo_Loco
@Kilo_Loco 3 года назад
Haha thanks!!! Been trying to improve production quality for a while now 😁
@trendz4422
@trendz4422 2 года назад
Whats the advantage of Combine over the closure strategy? 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.
@zoma128
@zoma128 3 года назад
Very very very helpful thank you so so much.
@Kilo_Loco
@Kilo_Loco 3 года назад
Happy you liked it 😁
@thompheijffer6379
@thompheijffer6379 3 года назад
Really good video man!😀
@Kilo_Loco
@Kilo_Loco 3 года назад
Haha glad you liked it 😁
@andrejkling3886
@andrejkling3886 3 года назад
Thank you...
@JulianoGAlvarenga
@JulianoGAlvarenga 3 года назад
Love it! 👏🏼
@Kilo_Loco
@Kilo_Loco 3 года назад
Thanks!
@JunaidKhan-ny8tu
@JunaidKhan-ny8tu 3 года назад
Incredible content 😍
@Kilo_Loco
@Kilo_Loco 3 года назад
Haha thanks!! 😊
@Mettaworldj
@Mettaworldj 3 года назад
Dang good explanation
@saifcodes
@saifcodes 3 года назад
Really nice and clean. Btw where can i get your editor theme? And what font is that?
@Kilo_Loco
@Kilo_Loco 3 года назад
Editor theme is Loco Dark which can be found here: github.com/Kilo-Loco/KiloLocoXcodeTheme I’m using JetBrains Mono for the font
@saifcodes
@saifcodes 3 года назад
@@Kilo_Loco thanks. I like it alot.
@karlalalalalala
@karlalalalalala 3 года назад
My question has nothing to do with Combine but I really wanna know... How does your Xcode convert the return symbol `->` to a real arrow???
@eichenherzmo
@eichenherzmo 3 года назад
Great Tutorial but I asked myself how would you implement passing values down like you are specifiing the number of sections in a table view?
@AdelUI
@AdelUI 3 года назад
Another great video thanks... i have 2 questions 1/ can i use same token set to multiple sink ?! 2/ can i use xombine framework like swiftUi ?! Meaning observableObject
@Kilo_Loco
@Kilo_Loco 3 года назад
1. Yes, you can use the same set on multiple sinks. 2. Yes, combine is very similar to using a @Published property of an @ObservableObject
@AdelUI
@AdelUI 3 года назад
@@Kilo_Loco your The best and beast ❤️😍
@nurlanakylbekov7266
@nurlanakylbekov7266 3 года назад
Thank you. 1) Can we run decode() inside return Future b4 promise(.success) ?? 2) Can we update tableView in inside case .finished completion?
@slash0t5
@slash0t5 3 года назад
How would I use it with Firestore snapshotlistener? DB updates aren't being read in the view controller function?
@davidhere_23
@davidhere_23 3 года назад
May i know why do we prefer combine over closures? Is there any particular benefits?🤔
@Kilo_Loco
@Kilo_Loco 3 года назад
You can use either honestly. My personal preference for combine over closures is that I feel that it makes code more readable once you’re used to the syntax and gives the opportunity for a single communication pattern over dealing with all the previous patterns used in development. It’s also new and shiny so that makes it attractive too
@davidhere_23
@davidhere_23 3 года назад
@@Kilo_Loco Haha okay. Thanks for the prompt reply 😄
@amanak3
@amanak3 3 года назад
Don't you think using observer in tableViewCells would cause a retain cycle?
@Kilo_Loco
@Kilo_Loco 3 года назад
I think it depends on the implementation but in this case, I don’t think so
@donathmm3881
@donathmm3881 3 года назад
For whattt should we use combine if it's so complicated and needed to use more code to get the same thing...
@Kilo_Loco
@Kilo_Loco 3 года назад
Combine is an opportunity to merge all your communication patterns into one. It’s also much easier to read and maintain when working with more complex asynchronous processes that may need to be chained together
@TekEffekt
@TekEffekt 3 года назад
Damn where can I hire this designer! I can pay him with clout and positive affirmations 😁
@Kilo_Loco
@Kilo_Loco 3 года назад
Lol will work for LinkedIn endorsements 😂
@haselhofler
@haselhofler 3 года назад
Next stop: Migrate to async/await ^^
@karlostj4683
@karlostj4683 Год назад
Uh, Kilo, you may want to refrain from calling yourself someone's "boy". It has negative connotations in America.
@carlosalcala6007
@carlosalcala6007 3 года назад
Best Combine Tutorial Ever !
@Kilo_Loco
@Kilo_Loco 3 года назад
Wow, thanks!
Далее
Getting Started With Unit Testing | XCTest | Swift
31:15
Ванесса 🆚 Крискас  | WICSUR #shorts
00:42
Getting started with Combine + UIKit in Swift
23:45
Просмотров 18 тыс.
How to use the Coordinator pattern in iOS
18:12
Просмотров 71 тыс.
Laid Off, AI is Coming
13:06
Просмотров 3,5 тыс.
8 Common SwiftUI Mistakes - and how to fix them!
28:05