Hey there!
I want to start a general discussion on implementing the Network.framework for iOS 12+ targets. As presented during the WWDC 2018, the new framework offers great benefits over the current native socket handling by having clean states and handling the waiting state more performant.
While exposing the Network.framework, Apple is also planning to deprecate the SFSocket and all related API's. They did not so far (but mentioned they may do over the next view betas) during the session.
Read more about the new API in the official API docs.
I just watched the WWDC 2018 Presentation on Network.framework and immediately came here to see what kind of plans are in store for Starscream. Not only are there perf benefits (mentioned above by @hansemannn), but there's also a big focus on connection durability across different network environments and switching between them (wifi->cellular).
I had same idea, that utilising Network.framework Starscream could be more stable. Because behind the scenes now there are really old C type APIs.
A while back I got survey from Apple about Networking. I guess this is the outcome of that survey.
I think soon I will start digging more into this Network.framework and can it be used with Websockets.
I have seen SwiftNIO Websocket implementation by Vapor guys https://github.com/vapor/websocket but it's not for iOS.
hey all. I agree the network framework is something we should probably look at implementing in Starscream. This of course is going to bring up backward compatibility issues, so I want to be careful on how to handle the transition. All that being said, I think it will be fairly straight forward to implement the Network framework since Starscream was setup back in version 3.0.0 to take in different network adapters. I plan to start working on and releasing this in a few weeks.
Working implementation on the xcode-10 branch.
Wow, very exciting! Thanks @daltoniam
One thing we need to take in consideration is that Network.framework doesn't support watchOS.
@daltoniam is the xcode-10 branch going to drop soon now that Xcode and iOS 12 are GM?
Is it possible some functionality is broken in Starscream 3.0.5 on iOS 12? Just tried some SocketIO stuff (uses Starscream) on iOS 12 and it does not work. Could be my fault, but just wondering.
@gimlids can you tell what kind of errors are you having?
Sorry, not having the issue anymore I think this was my fault.
On Mon, Sep 24, 2018 at 3:34 PM Kristaps Grinbergs notifications@github.com
wrote:
@gimlids https://github.com/gimlids can you tell what kind of errors
are you having?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/daltoniam/Starscream/issues/521#issuecomment-424097706,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALXpUJgbnk2x_falGW_Mo1OlEx4GM75ks5ueTPagaJpZM4Up3Ye
.
@fassko @daltoniam do you have ETA for this?
Thanks for your work.
@tamastimar Current version works well enough atm. And Network.framework is available only from iOS, tvOS 12.0+ and macos 10.14+. That makes life harder a bit.
Also I'm considering working with https://github.com/apple/swift-nio-transport-services
Hi @fassko @daltoniam any update on this? Looking forward to use the Network.framework based implementation
Hey y'all. #653 should add support for the Network.framework. I'm going to close this issue out. If you have any questions, feel free to ask on the PR, so we can track everything over there.
Most helpful comment
Working implementation on the xcode-10 branch.