Swift: WebSocket Real-Time Data Introduction (2022, iOS, Xcode 13)

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2021
  • In this video we will take a look at WebSockets in Swift & iOS. A type of url streaming session that lets us get real time data, webSockets can be used to build real time applications like Robinhood or others.
    www.piesocket.com/websocket-t...
    💻 Source Code: / iosacademy
    🎥 Subscribe for more: ruclips.net/user/iOSAcademy?su...
    😎 Like my teaching style? Check out some of my most popular courses! courses.iosacademy.io
    ** Popular Series
    Building Instagram: courses.iosacademy.io/p/build...
    Building TikTok: / @iosacademy
    SwiftUI for Beginners: ios-academy.teachable.com/p/s...
    ** 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 RUclips tech channel with TubeBuddy:
    www.tubebuddy.com/iosacademy
    #swift #websockets #urlSessino

Комментарии • 82

  • @iOSAcademy
    @iOSAcademy  2 года назад +14

    Enjoy my teaching style? Check out full series at courses.iosacademy.io

  • @TechRagh
    @TechRagh 2 года назад +5

    Congratulations on 42K, waiting for 50K celebrations and new videos as always :)

  • @folahanmikolawole8219
    @folahanmikolawole8219 5 месяцев назад +1

    omg i'm so glad i found this video, thank you.
    this video is so timely for me right now because at work I'm working on building a social media app with chatting capabilities using websockets. i'm the only ios developer here in the company, and i'm still a mid level ios developer that didn't even know about websockets before now; so i definitely would appreciate more websocket videos

  • @divsyntax9720
    @divsyntax9720 2 месяца назад

    Congrats! You've made it to 112k subs!!! 🥳Awesome tut btw!! Love WS, I wanna see more.

  • @oles1837
    @oles1837 2 года назад +6

    Thank You! Yes more websockets!

  • @Mettaworldj
    @Mettaworldj 2 года назад +1

    This is so timely thank you!!

  • @aafaqahmed2265
    @aafaqahmed2265 Год назад

    Whenever I see iOS Academy name writte below the video no google search, I leave everything and quickly tap on that. Thanks for creating the greate stuff.

  • @rev_kous9275
    @rev_kous9275 2 года назад +13

    I’m waiting for a video with Clean Architecture (VIP/MVVM, Clean Swift) for iOS.

  • @obinnaaguwa
    @obinnaaguwa 2 года назад +3

    It would be a pleasure to a see more please!

  • @abhishekmahajan3432
    @abhishekmahajan3432 2 года назад

    Great video.

  • @buck-johnson
    @buck-johnson 2 года назад +1

    This was a great video thanks.

  • @waheedafolabi6929
    @waheedafolabi6929 Год назад +3

    Nice walkthrough...thanks.
    In case the websocket server requires some parameters, how do we pass them?
    For example, an authorization token.

  • @alwaysrookie583
    @alwaysrookie583 2 года назад +2

    You are a good man

  • @perrygupta
    @perrygupta 4 месяца назад

    Perfect

  • @terrywong8005
    @terrywong8005 2 года назад

    Thanks for demo on how to use websocket on iOS app. Just one question about the demo. You said calling ping function for keep alive purpose. But why you only calling it in the didOpenWithProtocol delegate once only? the ping function are needed to call more oftenly? like once per minute etc?

  • @mokh08
    @mokh08 Год назад +1

    I really enjoyed that and thanksssss

  • @manishah92
    @manishah92 2 года назад +2

    thank you so much

  • @saikumarreddygujjula3703
    @saikumarreddygujjula3703 2 года назад +1

    Yes want more websockets!

  • @codechamp2599
    @codechamp2599 2 года назад

    Please make video on mvvm along with alamofire, swifty json with repository design pattern please

  • @mattdamon2532
    @mattdamon2532 2 года назад +1

    Thanks!

  • @gofudgeyourselves9024
    @gofudgeyourselves9024 2 года назад

    wow great i was never aware that we can achieve this with URLSession

  • @despode
    @despode Месяц назад

    Hi! Great video! I have a question though. Where does the "let message" come from, i.e. where does the "message" come from? It is not listed anywhere in the in parameters....

  • @setilanaji8442
    @setilanaji8442 2 года назад

    OMG OMG OMG
    You're the best

  • @phase5mediallc513
    @phase5mediallc513 Год назад

    This example was great in Storyboard format... Do you have example using SWIFTUI? I imagine it is similar - but different..

  • @user-ho3ml3er3b
    @user-ho3ml3er3b 2 года назад

    hello,could you please make a video to teach how to build an ios app with aws rather than firebase,because in China,the firebase services are all blocked. I would really appreciate that

  • @dhav7634
    @dhav7634 2 года назад +1

    Great video.
    Can you explain how the recursive send function will ever reach the sending part since we are calling send() just before it ?

    • @renedekker9806
      @renedekker9806 2 года назад

      The only thing the recursive send does is dispatch an action to be executed after 1 second. It returns immediately, and does not wait for that action to be executed.

  • @eldarkk4566
    @eldarkk4566 2 года назад +1

    More VIPER, CLEAN ARCHITECTURE, SWINJECT, SOLID, CUSTOM ANIMATIONS, TRANSITIONS, PUSH NOTIFICATION EXTENSIONS, AR, NFC, ASSOCIATED DOMAINS, DEEP LINKING, DYNAMIC LINKING, AUTOMATIC CALL RECEIVE

  • @andrewdunbar828
    @andrewdunbar828 7 месяцев назад

    A macOS command line app example would be useful.

  • @rommelreyes82
    @rommelreyes82 Год назад

    How can I make a program with socket and swift that allows the user to reserve seats for an airplane? It's a project from the university. I need help.

  • @hungpham-qb6ch
    @hungpham-qb6ch 2 года назад

    Do you have any course use Storyboard?

  • @vichhaikan7248
    @vichhaikan7248 2 года назад

    It would be a pleasure if you can make a real-life example app.Thank you.

  • @duyliem1770
    @duyliem1770 2 года назад

    Hi friend, is it possible to connect to websocket when app is killed?

  • @mohammadolwan6432
    @mohammadolwan6432 Год назад

    Hello, how can get "wss" protocol?

  • @UmairKhan-bu6gd
    @UmairKhan-bu6gd Год назад

    Can we send Push Notification with Socket

  • @victorriurean
    @victorriurean 2 года назад +1

    🔥🔥🔥

  • @JeffreyLarsen
    @JeffreyLarsen 2 года назад +4

    This is some good stuff! Unfortunately I'm late to the IOS dev game, so I have only learned Swift with SwiftUI. I might be in a minority asking this, but it looks like you are looking to do websockets again in the future, could you tackle it from the SwiftUI side? And/Or (this might be a stretch but) using the Combine framework? Like is that even possible? Thanks all the questions you've answered and now questions you let me ask

    • @iOSAcademy
      @iOSAcademy  2 года назад

      Absolutely

    • @oak_lef8408
      @oak_lef8408 2 года назад

      I'm an robotics engineer trying to learn some Swift to make a simple robotics control iOS app using a websocket to connect to a Raspberry Pi so this would be super helpful since I'm using SwiftUI!

  • @tayyabmubeen8798
    @tayyabmubeen8798 2 года назад +1

    Looking for more content on web socket Please

  • @kimsanov
    @kimsanov 2 года назад +8

    I am confused. If we have to manually recursively run receive() method - what is benefits of websocket in comparison to simple polling request?
    I thought that websocket allows somehow receive pushed data from server. Didn’t constant polling drain battery?

    • @shubhamjoshi8481
      @shubhamjoshi8481 2 года назад

      If you found any solution for this just ping me.

    • @easthastings6919
      @easthastings6919 2 года назад +1

      lol still no answer. i really hope someone answers us to debunk socket scam pyramide

    • @kimsanov
      @kimsanov 2 года назад +1

      @@easthastings6919 😅

    • @kimsanov
      @kimsanov 2 года назад +1

      @@easthastings6919 There are some other ways to use websocket. Found that under Linux You use some kind of hw interrupts. So your code only activates when data arrived. And OS manages other stuff

    • @renedekker9806
      @renedekker9806 2 года назад +1

      The server cannot simply send a message to the client because it would be blocked by firewalls for security reasons. The server can, however, send a response to a message sent by the client.
      Therefore, under water, the "receive" method sends out a message (call it a "receive request") to the server, and then the server waits with responding to that message until it has something to say. Then the server responds with the data it wants to sent. This response arrives in the completion handler of the "receive" method. The client then sends out a new "receive request", to wait for a new response.
      So the "receive" completion handler is only called when the server has something to say (or after a time out).
      But I agree that it is weird that Apple choose to expose that mechanism in the interface.

  • @gregfrllo
    @gregfrllo 2 года назад +1

    more socket please :)

    • @iOSAcademy
      @iOSAcademy  2 года назад

      Coming soon!

    • @KK-pq6lu
      @KK-pq6lu 2 года назад

      Would like to see how to get socket addresses and address of the device

  • @luki8502
    @luki8502 2 года назад

    Kinda unrelated to this video but is there any reason you did the Instagram and Spotify apps with CGRects and not AutoLayout? Since you understand how it works I couldn’t get why you were doing all those maths calculations 🤯 Also those don’t bring landscape support

    • @iOSAcademy
      @iOSAcademy  2 года назад +1

      Both autolayout & frame layout are used professionally. I just preferred frame based

  • @oak_lef8408
    @oak_lef8408 2 года назад +1

    Will this work on an M1 mac?

  • @andrewdunbar828
    @andrewdunbar828 7 месяцев назад

    parenthasea

  • @aniketkumar3218
    @aniketkumar3218 2 года назад

    wss = websocket secure
    not websocket stream

  • @eldarkk4566
    @eldarkk4566 2 года назад +1

    More sockets and payments online

  • @mac6779
    @mac6779 2 года назад

    content is good. video quality needs to be improved.

  • @Tenly2009
    @Tenly2009 2 года назад +1

    “It’s really not a lot of code”
    Yeah 🤦🏻‍♂️ …. Because you cut so many corners and left out a ton of stuff that should be there - even in a demo.
    Maybe if you stopped going over how to create a new project and if you started with your UI already designed, you’d be able to devote a more appropriate amount of time and code to the actual topic of the video.