Тёмный

How to use AsyncPublisher to convert @Published to Async / Await | Swift Concurrency #12 

Swiftful Thinking
Подписаться 50 тыс.
Просмотров 15 тыс.
50% 1

AsyncPublisher is a lesser-known part of Swift Concurrency, but it helps to bridge the gap between Combine and Swift Concurrency. This becomes a major factor when migrating applications that were previously not set up for Async/Await, specifically, if you use the @Published property wrapper often and want to convert the publisher into an AsyncPublisher!
Previous video: • What is the Sendable p...
If you enjoyed this FREE playlist, please consider supporting the channel: www.buymeacoff...
🤙 WELCOME BACK 🤙
WEBSITE: www.swiftful-t...
DISCORD: / discord
GITHUB: github.com/Swi...
SAY THANKS: www.buymeacoff...

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

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 84   
@raphaels8585
@raphaels8585 2 года назад
I just went through the whole playlist, that was amazing I learnt SO MUCH! I'm never using a completion handler ever agaiiiiiiiin 🤩 Thank you Nick you're the man!!!
@editavatar6423
@editavatar6423 5 месяцев назад
I have been following your playlists in a structured format the way you have created them. You are doing an amazing job mate. Keep up the great work.
@advindoor
@advindoor 7 месяцев назад
Hi. In your video we use class for `AsyncPublisherDataManager`. How work with manager if replace `class` -> `actor`?
@wjcnwjcn
@wjcnwjcn Год назад
Task.sleep(for:tolerance:clock:) in iOS 16 is nicer than Task.sleep(nanoseconds:) in iOS 13.
@libormatyas8167
@libormatyas8167 4 месяца назад
Hello Nick, thank you for your video. I came across your video when Xcode 15.4 is current version. Do you have some updated tutorial/way that would compile without errors/warnings with "Swift Compiler - Language - strict concurrency checking set to "Complete"? I am getting several warnings/errors. At first glance I was happy to finally come along a way how to do this :). By the way, you never changed your manager back to "actor". Would be great if you have some updated version of the code. Thanks for your videos. Libor
@ShredzZ
@ShredzZ 2 года назад
Hi, do you think iOS development is good if I want to be freelancer?
@mylaluna
@mylaluna 6 месяцев назад
The AsyncPublisher seems to bridge the two worlds but it does not conform to the Sendable protocol. This means when you try to pass it as a parameter into a task of function, you will see a non-sendable type warning. Such a painful yet common situation.
@МихаилПеревозчиков-ц4р
Hey, Nick! This was so cool. You are an amazing teacher. There was a lot new things I learned during watching this playlist! Especially the StructClassActor video. Thank you so much for your work!😃
@SwiftfulThinking
@SwiftfulThinking Год назад
Thanks for watching!!
@alsafeerq82009
@alsafeerq82009 2 года назад
Is there a way to prevent screen capture or screen recording for the app on macos, ios and ipados?? And how to add the app user iCloud email as watermark on videos and text presented in the app?
@SiamakAshrafi
@SiamakAshrafi 2 года назад
My third time watching all these videos in the Playlist ... LOL
@Reallymellie
@Reallymellie Год назад
You are the best Nick! Grateful for your video's!
@mdfasiuddinraihan2049
@mdfasiuddinraihan2049 2 года назад
Can you please make bitbuket ci/cd tutorial for iOS?
@ShooMPozitiV
@ShooMPozitiV 2 года назад
Nick? Are you alright? ) I can’t wait any more for new videos ) No one do it better then you
@SwiftfulThinking
@SwiftfulThinking 2 года назад
Im here bro! Just been busy 🥵
@ShooMPozitiV
@ShooMPozitiV 2 года назад
@@SwiftfulThinking Ok) I’m patiently waiting. Do your best, bro 💪
@oliverbarreto1838
@oliverbarreto1838 2 года назад
Great work Nick ! I Would like to know if you are planning to create a playlist with an example using async/await concurrency APIs … for example refactoring the crypto app. For me that would be the missing piece to put all this knowledge into work.
@Den-ig5bs
@Den-ig5bs 8 месяцев назад
Thanks for videos, appreciated
@maciusessa
@maciusessa 2 года назад
Love this playlist. Thank you a lot. Currently i am trying to migrate some of my projects from Combine to Concurrent code. Very helpful videos.
@indomitabletr1834
@indomitabletr1834 Год назад
watched all and looking forward to new ones ❣
@shafeerehman7464
@shafeerehman7464 2 года назад
Greeting From Pakistan, Just wanted to let you know that my job depends on you so please keep this channel forever :D best SwifUi teacher on youtube handsdown
@SwiftfulThinking
@SwiftfulThinking 2 года назад
Hello from across the world 🥳 thanks for watching Shafee!
@1slyboy
@1slyboy 11 месяцев назад
So since the for await loop never ends (in addSubscribers) does this mean that the AsyncPublisherBootcampViewModel class will never go away even after the view is no longer being displayed? It has a hard reference to self, and seems like it will never get canceled?
@1slyboy
@1slyboy 11 месяцев назад
Confirmed in the next video, keep a reference to the task and cancel it.
@lincolndickerson1293
@lincolndickerson1293 2 года назад
First this play list is absolutely the rosetta stone to swift concurrency. You are a great teacher. I will be doing this next thing myself as soon as I am done here. It seems you forgot to switch the datamanager back to being an actor and I am curious about what happens then.
@lincolndickerson1293
@lincolndickerson1293 2 года назад
It worked as expected with no combine had to put another await: for await value in await manager.$myData.values. I also added a button with a Task in the action to add more… this is so fun. Super easy to work with and very readable. Thanks again.
@pakaponwiwat2405
@pakaponwiwat2405 Год назад
Thank you very much!😻
@tbg6nb
@tbg6nb Год назад
17:15 and is it still in beta now ?
@bytesizedscreencasts
@bytesizedscreencasts 2 года назад
Hey, just finished watching this series. How about a series on "What's new in SwiftUI in iOS 16" Series? Covering all about new navigation stack, charts, weather kit etc etc.
@marcelfyi
@marcelfyi Год назад
This has been a fantastic playlist. Thank you very much! Can't wait for your future content.
@pangea6919
@pangea6919 Год назад
You the man Nick!
@vlastos
@vlastos 2 года назад
Combine is apple's RxSwift/RxJava and Async Sequence is Kotlin Flow
@kdtechniquesofficial6153
@kdtechniquesofficial6153 Год назад
I’m waiting for the combine latest, denounce, store in cancellable, map, decode, etc in the form of Async in this playlist in the near future. Good luck Nick.🎉
@光莒
@光莒 2 года назад
I'm exciting to know anything about async/await and async topic. It's hard for me to read the apple document... This is just a greatest channel for learning Swift I have ever seen before~~ Thank you Nick~
@Taras195
@Taras195 Год назад
This whole playlist has cleared up sooo much head fog i've been getting last month. Thank you for your efforts and examples!
@Antonnel7
@Antonnel7 Год назад
hi nick!! A good course will give you an idea - there is not enough course on application architecture for swiftui example (redux + state ) and system type + action
@khaledsh8506
@khaledsh8506 Год назад
Amazing playlist, complete with everything we need to know, much thanks.
@serhii_rs
@serhii_rs 2 года назад
Please make a video lesson for properly architecture of multi-language application.
@morreke
@morreke 2 года назад
Man I just got used to Combine, now this :) Btw, you changed the actor into a class. but didn't revert it back to an actor. When doing this, the task should begin with "for await value in await manager.$myData.values"
@sfunke2004
@sfunke2004 2 года назад
Great playlist, thanks! I have one remark regarding cancellation: To me it seems that with Combine you get cancellation "for free" using cancellables, while when using "for await", you seem to have to manage that yourself? In your example, in case of the view's disappearing, I think the Viewmodel's Task would go on forever, since the publisher never finishes. Not sure if there are any best practices regarding cancellation out yet?
@fragrantume
@fragrantume 2 года назад
Hi Nick! Could you please create a video about SOLID? I recently got stuck with it, but I believe that your aptitude for explaining will help me figure this this out.
@penguinwolf0125
@penguinwolf0125 Год назад
Very useful!! Pleaseee more videos with new Async Await features 🙌🏻
@РауанБимат
@РауанБимат Месяц назад
Hi,Nick, can you tell me where the playlist about the harvester is? by the way, thanks for the lessons, you explain everything perfectly, I heard at 17:38 that you have a playlist about the combine
@SwiftfulThinking
@SwiftfulThinking Месяц назад
What is harvester? You can search for the Combine videos here: www.swiftful-thinking.com/search
@РауанБимат
@РауанБимат Месяц назад
@@SwiftfulThinking Sorry, I wanted to write a combine, typo
@РауанБимат
@РауанБимат Месяц назад
@@SwiftfulThinking thanks❤️
@alexanderkorchak1270
@alexanderkorchak1270 Год назад
Thanks, Nick! Best course ever. Spent wonderful time watching and practicing.
@wangbourne1380
@wangbourne1380 2 года назад
since `values` only support iOS 15, is there a way to support iOS 14 too?
@bjornlindner637
@bjornlindner637 2 года назад
Another awesome tutorial, thanks for that. Is there no way to enable addData to tell the subscriber when it is finished?
@JohnStrandt
@JohnStrandt Год назад
You did an excellent job explaining the topics. Thanks!!
@alexbui0609
@alexbui0609 Год назад
Finished the playlist. Amazing work Nick!
@pearl-z3475
@pearl-z3475 2 года назад
兄弟们,卷起来!!!
@МаксимСкарабов
TY for your lessons! English is not my native language but you explain about ios developing better and clearer than a lot of russian online teachers
@HUNTELAAR11W
@HUNTELAAR11W 2 года назад
Incredibile video as always, how you reach this level of knowledge? Where you started?
@GoatComedians
@GoatComedians Год назад
Hey Nick, love your content! Just sent you a DM on Instagram, I hope the unforeseen potential for opportunities intrigues you as much as it does for me. Look forward to hearing from you soon!
@Lvoonok
@Lvoonok Год назад
Love your videos, thank you! How often do you use async Await in your apps?
@mafiaboy16
@mafiaboy16 Год назад
I know i’am more than two years behind, but so far i’m learning a lot from you😊😊
@ShooMPozitiV
@ShooMPozitiV 2 года назад
What I will do without your lessons when you’ll cover all swift themes? )
@bhuwin6186
@bhuwin6186 Год назад
You are the Goat nick, hopefully more videos in future.
@Jacksonmark
@Jacksonmark 2 года назад
By 12:24, you had already helped me solve my current problem! TY.
@lizakryshkovskaya7412
@lizakryshkovskaya7412 Год назад
I'm enjoying a lot your way of teaching! Thank you! 🙏
@asadchattha3470
@asadchattha3470 6 месяцев назад
Thanks Nick❗
@Prashant-7
@Prashant-7 10 месяцев назад
13:38 🤯 crazyyy
@kdtechniquesofficial6153
@kdtechniquesofficial6153 Год назад
Just Finished your Concurrency Playlist and now it’s time to watch the final playlist called ‘Swift UI - Advanced Learning’. After watching that playlist I’ll start working on 5 brand new projects one after another. Damn I feel Like I’m about to Master Swift UI because of you.🎉❤ #SwiftUIAngle #SwiftUIGoat
@SwiftfulThinking
@SwiftfulThinking Год назад
KD BEAST MODE
@dugrut1325
@dugrut1325 2 года назад
2nd time thru
@SwiftfulThinking
@SwiftfulThinking 2 года назад
I didn’t realize u we’re on this course too 😅 much harder than the first bootcamp lol
@bruhmoment3731
@bruhmoment3731 2 года назад
last video in this playlist! Wow! It's been so great
@lukematthewsutton
@lukematthewsutton 2 года назад
Loving these videos mate. Been a great help for me as I work on introducing async into an existing project.
@Seepho
@Seepho 2 года назад
We need a practice playlist to use concurrency!
@josemanuelortizsanchez4983
@josemanuelortizsanchez4983 Год назад
Its the best RU-vid list, congratulations!
@РомаРома-х7о
@РомаРома-х7о 2 года назад
Thanks man for your videos! Easy to understand!
@esakkimuthu3397
@esakkimuthu3397 Год назад
I loved your way of teaching stuff. I’m new to iOS development, I watched your full beginner, intermediate, concurrency and Todo playlist and learned a lot. Thank you for your effort. I’m gonna keep watching your remaining playlist. ❤
@SwiftfulThinking
@SwiftfulThinking Год назад
Wow! That’s a lot haha thanks 🚀
@DmytroIpatii-cf2eq
@DmytroIpatii-cf2eq 3 месяца назад
🔥
@andresraigoza2082
@andresraigoza2082 2 года назад
Awesome playlist, thank you so much Nick
@3ilz
@3ilz 2 года назад
Great playlist, love everything
@alyonaKisha
@alyonaKisha Год назад
The best playlist on this theme!! So many useful info!! Thanks a lot for sharing!!!
@SwiftfulThinking
@SwiftfulThinking Год назад
Thanks for watching 👍
@MarkVolkmann
@MarkVolkmann 2 года назад
Thanks so much for creating these!
@heesungkang1968
@heesungkang1968 2 года назад
damn your so lovely dude
@SiamakAshrafi
@SiamakAshrafi 2 года назад
Yes. Very good!
@KEVINKIM2586
@KEVINKIM2586 2 года назад
Thx for the series!!
@Sfstboy
@Sfstboy 2 года назад
This course was very helpful to understand async await. I was able to convert combine in the Crypto Tracker app relatively easily. Thanks for the amazing courses.
Далее
Reconsidering @Published - Combine to Async Part 1
8:37