Publisher and Subscriber protocol in Combine Swift Hindi Tutorial

Поділитися
Вставка
  • Опубліковано 2 сер 2024
  • Publisher and subscriber protocol in combine framwork are the key fundamentals that you should know before writing your first SwiftUI app. In this video, we will explore what publishers and subscribers are along with their life cycle.
    This is just an introduction of publisher and subscribers to get you started with combine there will be more detailed use cases where we build our own custom publisher and subscriber to handle a custom app behavior.
    This video is a part of the combine beginner series, I recommend watching the beginners playlist before you start your journey with combine.
    Given are the chapters in the video
    0:00 introduction
    0:19 codecat15 example
    1:27 combine publisher extensions
    2:10 publisher and subscriber protocol
    4:17 publisher and subscriber lifecycle
    9:56 conclusion
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ✅ Subscribe to the channel and stay ahead of everyone by following the right way for writing clean code in swift. 🔥🔥🔥🔥🔥
    🔗Click on the link to subscribe: ua-cam.com/users/codecat?sub...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -----------------------------------------------------------------------------------------------------------------------
    📥 Download the source code from
    GitHub: github.com/codecat15/UA-cam-...
    Google Drive: drive.google.com/file/d/13dCK...
    -----------------------------------------------------------------------------------------------------------------------
    ############################################
    Connect with me on social media
    Instagram: / codecat15
    📧: codecat15@gmail.com
    🐦: / codecat15
    Facebook: / code.cat.792
    Github: github.com/codecat15
    ###########################################
    #combine #swiftui #combineHindiTutorial

КОМЕНТАРІ • 49

  • @Nidhi803
    @Nidhi803 2 роки тому +3

    Best real time examples you have :) Every time I watch ur content I pass my gratitude to u .Thanks!!

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      Thank you for your kind words Nidhi, I am grateful

  • @shabinaqvi9594
    @shabinaqvi9594 2 роки тому

    i must say thanks and then watch.. just wow!!

  • @iamwaseem99
    @iamwaseem99 3 роки тому +1

    Awesome as always. Excited for more Combine videos 🙌

    • @CodeCat15
      @CodeCat15  3 роки тому +1

      Thank you Waseem, there's more to come on combine.

  • @AnkitSingh-wq2rk
    @AnkitSingh-wq2rk 3 роки тому +1

    Was waiting for this !

  • @Real_Indian_bhartiya
    @Real_Indian_bhartiya Рік тому

    mja aa gya bhai

  • @JunaidKhan-ny8tu
    @JunaidKhan-ny8tu 3 роки тому +1

    This is just amazing brother :-) Keep it up

    • @CodeCat15
      @CodeCat15  3 роки тому +1

      Glad this was helpful Junaid 👍

  • @ssaai
    @ssaai 3 роки тому +2

    Wow 🥳

    • @CodeCat15
      @CodeCat15  3 роки тому +1

      Please feel free to ask questions on the topic and do share the combine playlist with your iOS group

  • @shashankmishra5329
    @shashankmishra5329 3 роки тому +1

    Awesome👏

    • @CodeCat15
      @CodeCat15  3 роки тому

      Thank you! Cheers! Please feel free to ask questions and do share the same with your iOS group

  • @jiteshsingh98
    @jiteshsingh98 3 роки тому +2

    🔥Always

    • @CodeCat15
      @CodeCat15  3 роки тому

      👍 glad this was helpful

  • @krishaSadhu
    @krishaSadhu 3 роки тому +1

    Hello sir,
    First of all, thank you so much for sharing these much knowledge with us on UA-cam channel but there is one more help we need.
    Can you please share interview questions with us for fresher! Including logical question.
    If you do it I will be grateful to you
    In swift:

  • @unseenSky
    @unseenSky 3 роки тому +1

    Love the way you explain!

    • @CodeCat15
      @CodeCat15  3 роки тому +1

      Thank you Somendra, please do ask questions if any and do share the channel with your iOS group on WhatsApp or Facebook

    • @unseenSky
      @unseenSky 3 роки тому +1

      @@CodeCat15 I have shared your channel with my friends.

    • @CodeCat15
      @CodeCat15  3 роки тому +1

      Thank you for the support Somendra much appreciate it 👍

  • @mounikareddy9689
    @mounikareddy9689 3 роки тому +4

    Can you please make videos in english otherwise add subtitles. I found this channel is useful for me to learn great things. unfortunately i dont know that much hindi to understand

    • @CodeCat15
      @CodeCat15  3 роки тому +2

      I am working on the subtitles for this one, unfortunately adding subtitles is a little lengthy process but will try to include them for all my combine videos

  • @hardipgajera2316
    @hardipgajera2316 3 роки тому +1

    very helpful thanks ravi

    • @CodeCat15
      @CodeCat15  3 роки тому

      Glad it was helpful Hardip

  • @dheerjdhiman4983
    @dheerjdhiman4983 3 роки тому +1

    Amazing

    • @CodeCat15
      @CodeCat15  3 роки тому

      Glad it was helpful Dheerj

  • @shikhabudhiraja7084
    @shikhabudhiraja7084 2 роки тому

    Hi Ravi, Can you please create one video on MVVM 2 way binding with combine. I tried finding video in your playlist for MVVM + 2 way binding as you discussed in some of your MVVM video series.

  • @bhimashankarhatture3548
    @bhimashankarhatture3548 3 роки тому +1

    Hi, Thank you for awesome tutorials. Plz make RxSwift Tutorials. ( Dada plz RxSwift che pan tutorials banva )🙏

    • @CodeCat15
      @CodeCat15  3 роки тому

      Actually, me mudhamun nahi release kela aahe RxSwift che videos karan jo framework aaj nahi tar udya jaanar aahe tya framework var video add karun kahi arth nahi hai,
      sorry tula white vatla asel pan khara sangto aata market madhe sagli companies combine ani SwiftUI vicharayela shuruvat keli aahaye ani barpoor ashe mitra aahe maze je lok aata slowly tayanche Rx che project combine var shift kartat tar ye sagla aiklya var mala vatat nahi re ki RxSwift market madhe jast divas rahnaar.
      Aani RxSwift peksha tar combine strong aahe in terms of performance and ease of learning to be honest. Once again bhau sorry jar tula white vatat asel tar 🙏

  • @akshaygajarlawar8878
    @akshaygajarlawar8878 2 роки тому

    Hey thanks Ravi for the knowledge sharing. In one of my projects, there are 2 different swift packages being used by 1 app.
    * App can access whatever publicly available from both the packages.
    * Packages can’t access anything from the App.
    * Packages can’t share anything between each other.
    Problem: when button on view inside package 1 is clicked, it should navigate to the view available inside package 2. But its not possible directly as package 1 can’t access any classes of package 2.
    Solution I’m thinking of:
    Send notification from package 1 to App, App will listen to the notification and push the respective view available in package 2 accordingly. (App already have the navigation logic defined, so no worries on navigation part). I was thinking to do so using NotificationCenter. But after watching this video, just wanted to know how can we solve this inter-module navigation scenario using the publisher-subscriber approach in SwiftUI?

  • @shahriarmahmud7850
    @shahriarmahmud7850 2 роки тому

    @Code Cat Sir is it possible to create. a full video in Combine with an example ?

  • @nsmlsof
    @nsmlsof 2 роки тому +1

    Dear Code cat, great videos. May I add a quick nitpick? It's is "equal" to and not is "equals" to. Just thought you'd like to know.

    • @CodeCat15
      @CodeCat15  2 роки тому

      Indeed, thanks for sharing

  • @poojaraghuwanshi1914
    @poojaraghuwanshi1914 Рік тому +1

    @Ravi are there more videos available for Combine frame work made by you??

    • @CodeCat15
      @CodeCat15  Рік тому

      not as of now, but I am slowly working towards them and they will be available soon

    • @poojaraghuwanshi1914
      @poojaraghuwanshi1914 Рік тому

      @@CodeCat15 ok

    • @poojaraghuwanshi1914
      @poojaraghuwanshi1914 Рік тому

      @@CodeCat15 Hey Ravi do you have experience about Loco app that is for adding localisation in our project ?

  • @Jock3R87
    @Jock3R87 2 роки тому

    Hey Mate as usual fantastically fantabulous video and really appreciate your efforts for makings such videos for the iOS community. I believe its high time to use COMBINE and get rid off so called THIRD PARTY LIBRARY RxSwift… I think below two reasons
    1) Its create your project unnecessarily big which later problematic to maintain (if dev has used in sensible way)
    2) Being external library It brings self-doubt as this has been developed by other community
    I believe this video and series gonna help us to understand FRP within Apple ecosystem.
    Fun part :
    All dev’s you all know aakhir ‘Apne to Apne hote hai baki sare Sare sapne hote hai’ 😀 so start using combine instead RxSwift and make it XSwift 😂😂.

  • @javedsiddique6016
    @javedsiddique6016 3 роки тому +1

    How can i pass data from one controller to another viewcontroller using publisher and subscriber

    • @CodeCat15
      @CodeCat15  3 роки тому +1

      That portion will be covered in the upcoming sessions, however for the time being you can watch the EnvironmentObject video as there I have shown how you can manage passing data you may need to also see the Observable object video as both these videos are connected together
      Observable object: ua-cam.com/video/GG0z7LpNyq4/v-deo.html
      Environment object: ua-cam.com/video/oJg5CJSXs6w/v-deo.html

  • @rakesh58652
    @rakesh58652 2 роки тому

    What’s the difference between RXSwift Subscribers & Combine Subscribers

    • @CodeCat15
      @CodeCat15  2 роки тому

      both do the same thing, however internal working of them may differ as they are two different frameworks we are dealing with, when it comes to usage I recommend one that's native which is combine than using a third party, I am not a huge fan of Rx because it causes more pain that it should so in some of the projects we dropped it completely and used simple UIKit because we saw really there was no need of using Rx in the first place not sure what the original team was smoking when they went with Rx

  • @ushadesai6306
    @ushadesai6306 2 роки тому +1

    when to use combine framework? what are the use cases in a SwiftUI? I am new to Combine.

    • @CodeCat15
      @CodeCat15  2 роки тому

      It's not mandatory to use combine for your projects you can still use UIKit to develop apps, the only advantage with combine is that you can develop UI much faster without worrying about large storyboards and constraints where most of the time is invested.
      Also combine offers a lot of property wrappers where things like two-way binding is out of the box and hence one can just subscribe to the event and update the UI without having to implement delegates etc.
      So I say its more of a personal choice what you want to choose, also project maintenance should be kept in mind before selecting this, like how soon you want the app to be delivered also what happens when you encounter complications or a complex module and all of this can be discussed while project design or what some call as sprint zero.

    • @ushadesai6306
      @ushadesai6306 2 роки тому

      @@CodeCat15 Thank you, I realized a while ago that it can be quite handy for Json api downlaods compared to older method of escaping closure.

    • @CodeCat15
      @CodeCat15  2 роки тому

      That’s just one thing, there’s actually a lot but then I fear that now the code to manage the view is going to be cumbersome as some devs may tend to dump their UI code in just one file which may become nasty to manage
      The UI elements should be broken down into their own separate views keeping reusability in mind

  • @rajanmaheshwari
    @rajanmaheshwari 3 роки тому +1

    Your title is a bit misleading. Combine framework is not only available in SwiftUI but non SwiftUI as well. You should rename the word SwiftUI to Swift in your title.

    • @CodeCat15
      @CodeCat15  3 роки тому

      Thank you for calling that out Rajan, I have made the change 👍 let me check other video title too and make corrections