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
Enjoy my teaching style? Check out full series at courses.iosacademy.io
Can implement websocket on app delegate?
Congratulations on 42K, waiting for 50K celebrations and new videos as always :)
Thank you!!!
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
You got this!
thank you!@@iOSAcademy
Congrats! You've made it to 112k subs!!! 🥳Awesome tut btw!! Love WS, I wanna see more.
Thank You! Yes more websockets!
You’re welcome
This is so timely thank you!!
Youre welcome
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.
Thanks for that!
I’m waiting for a video with Clean Architecture (VIP/MVVM, Clean Swift) for iOS.
Coming soon
It would be a pleasure to a see more please!
Coming soon!
Great video.
This was a great video thanks.
Youre welcome!
Nice walkthrough...thanks.
In case the websocket server requires some parameters, how do we pass them?
For example, an authorization token.
You are a good man
Haha thanks
Perfect
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?
I really enjoyed that and thanksssss
Thanks!
thank you so much
Youre welcome!
Yes want more websockets!
Coming soon
Please make video on mvvm along with alamofire, swifty json with repository design pattern please
Thanks!
Youre welcome!
wow great i was never aware that we can achieve this with URLSession
yep, pretty cool stuff
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....
OMG OMG OMG
You're the best
This example was great in Storyboard format... Do you have example using SWIFTUI? I imagine it is similar - but different..
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
Great video.
Can you explain how the recursive send function will ever reach the sending part since we are calling send() just before it ?
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.
More VIPER, CLEAN ARCHITECTURE, SWINJECT, SOLID, CUSTOM ANIMATIONS, TRANSITIONS, PUSH NOTIFICATION EXTENSIONS, AR, NFC, ASSOCIATED DOMAINS, DEEP LINKING, DYNAMIC LINKING, AUTOMATIC CALL RECEIVE
A macOS command line app example would be useful.
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.
Do you have any course use Storyboard?
It would be a pleasure if you can make a real-life example app.Thank you.
Coming soon
Hi friend, is it possible to connect to websocket when app is killed?
Hello, how can get "wss" protocol?
Can we send Push Notification with Socket
🔥🔥🔥
Thanks
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
Absolutely
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!
Looking for more content on web socket Please
Added to my list!
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?
If you found any solution for this just ping me.
lol still no answer. i really hope someone answers us to debunk socket scam pyramide
@@easthastings6919 😅
@@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
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.
more socket please :)
Coming soon!
Would like to see how to get socket addresses and address of the device
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
Both autolayout & frame layout are used professionally. I just preferred frame based
Will this work on an M1 mac?
Yes
parenthasea
wss = websocket secure
not websocket stream
More sockets and payments online
Coming soon!
content is good. video quality needs to be improved.
thanks for the feedback
“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.
Thanks for the feedback