Closed JetForMe closed 2 years ago
So I was initially planning on using starscream 4 but ran into issues into how to reports failed connection attempts to the delegate which broke the Client's reconnection strategy so I kept it pinned to 3.x. I also need to provide an update to use RxSwift 6.x so I will probably create a 2.x and 3.x branch that updates dependencies.
I'll take a look over your PR and see if we can't get Starscream 4.x to work
Apollo has since rollback to Starscream 3 after reliability issues
👍🏼 Thanks @morgz
I'm going to close this issue since I'm also not a fan of how Starscream 4 works with this client. If you're targeting iOS > 13, then SPC comes with a default URLSessionWebSocketTask implementation that avoids using starscream at all.
I can try to use the URLSessionWebSocketTask implementation, but if the Package.swift file doesn't provide a way to resolve the Starscream version conflict, I'm not sure what to do.
It should allow for it. The core client doesn't include starscream.
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(name: "SwiftPhoenixClient", targets: ["SwiftPhoenixClient"]),
.library(name: "StarscreamSwiftPhoenixClient", targets: ["StarscreamSwiftPhoenixClient"]),
.library(name: "RxSwiftPhoenixClient", targets: ["RxSwiftPhoenixClient"]),
],
You should be able to just use
.package(url: "https://github.com/davidstump/SwiftPhoenixClient.git", .upToNextMajor(from: "3.0.0"))
and that will exclude starscream from the client
I can't use this with Apollo, because Apollo requires Starscream >= 4.0, and SPC <4.0. I was hoping SwiftPhoenixClient 2.0 would update to the more recent Starscream, but alas it does not. Any chance of that happening?
Here's the error I get when I try to use SPM for both SPC and Apollo:
We were using CocoaPods for Apollo, and that seemed to work, but I'm trying to move away from CocoaPods.