SwiftStomp icon indicating copy to clipboard operation
SwiftStomp copied to clipboard

Starscream dependency prevents build

Open terlan98 opened this issue 1 year ago • 6 comments

There's currently an issue with the Starscream dependency that is causing the builds to fail. We've managed to fix it temporarily by adding Starscream 4.0.4 (exact version) as a dependency on our project.

stomp error

terlan98 avatar Aug 23 '23 19:08 terlan98

Hey, Thank you for letting me know. I'll fix it on the next build.

Romixery avatar Aug 25 '23 14:08 Romixery

@Romixery Do you have an ETA on a new build with this fix? It's causing my team some headache since we have to manually imbed some libraries to make this even compile.

RSady avatar Sep 07 '23 13:09 RSady

Unfortunately the StarScream Team did not follow the rules of semantic versioning (even though they state they are in their Change Log), and introduced compatibility breaking changes following their 4.0.4 release. These changes are: • As WebSocketDelegate's didReceive(event:client:) signature was changed (the latter parameter is now a WebSocketClient, not a WebSocket), • A new WebSocketEvent kind was introduced (peerClosed)

I addressed these changes and created a Pull Request. Note: unfortunately as these changes are breaking, the minimum version number of Starscream dependency was increased to 4.0.6. SwiftStomp's interface is unaffected, so I tagged it as 1.1.2. I hope you'll find it useful.

aszter avatar Oct 12 '23 11:10 aszter

We were having the same issue, it seems to be fixed with your #15 pull request, which is great! Could there perhaps be a new version release (e.g. 1.1.2) @Romixery, so people using the library will get it to work without looking at the issues? That would be great, for now I'll be using the master branch which is fine, but not everyone might know this or skip the library due to the given issue.

Nielssg avatar Jan 14 '24 20:01 Nielssg

I also came across this issue trying integrate this package. @Romixery it would be great to have a new version released with this fix. @Nielssg's suggestion to use master helped me out, thanks. I ended up pegging SPM to the commit 8b48dcd32f3e9a107b016b0b1460952004abd480.

DanielKrofchick avatar Feb 16 '24 16:02 DanielKrofchick

Uncomment the next line to define a global platform for your project

platform :ios, '17.0'

Change the project to your project name

target 'Project' do

Comment the next line if you don't want to use dynamic frameworks

use_frameworks!

Pods for Project

pod 'SwiftStomp' pod 'Starscream', :git => 'https://github.com/daltoniam/Starscream.git', :tag => '4.0.4'

target 'ProjectTests' do inherit! :search_paths # Pods for testing end

target 'ProjectUITests' do # Pods for testing end

end

To evercome StartScream library not matching this library. With this setup on my pod file worked totally fine.

emre010101 avatar Feb 21 '24 09:02 emre010101

The Starscream has been removed from the project and now we are using URLSessionWebSocketTask instead. Please update to latest version.

Romixery avatar May 20 '24 16:05 Romixery