Comments (30)
Good job ;-) I am close it now
from stompclientlib.
Sorry, my issue)reconnect from example works fine. Thanks for lib)
from stompclientlib.
Hello @xaeroolj,
The example code is made from the stratch project. Can you share your example code with me?
Let's solve the issue together.
from stompclientlib.
I try:
override func viewDidAppear(_ animated: Bool) {
socketClient.disconnect()
}
And stompClientDidDisconnect was called...
give me sec I will share code..
from stompclientlib.
Can I connect your WebSocket externally?
from stompclientlib.
yes it work now
from stompclientlib.
@xaeroolj
I've tested your exact code and it works perfectly... What is your problem there?
from stompclientlib.
Yes it must work... But my output is>>
from stompclientlib.
And different result when I use example project...
from stompclientlib.
Okay, let me create an example project for you.
from stompclientlib.
Wow, literally not working with a fresh project :) Let's dig deeper together @xaeroolj.
I'm currently testing on your issue. Can you please share your stomp server properties with me? Which version of Spring Boot are you using?
from stompclientlib.
Okay, Here it is.
I've tried the same fresh project with my own simple stomp server. It works perfectly. I believe that there is something wrong with your backend side. Can you dig on it?
from stompclientlib.
Well, I can find how to temporary fix this,
I take file from example project: StompClientLib.swift
and put it in the head folder of my new project.
StompClientLib.txt
from stompclientlib.
from stompclientlib.
if I delete StompClientLib.swift from project it stops working again.
from stompclientlib.
I check 2 files for differences and its looks like problem is here on line 136-137
from stompclientlib.
One more thing,
- Remove file from the head
- replace StompClientLib.swift inside PODS/pods/StompClientLib/
- In Xcode: Product -> Clear build folder
- Build and run
Work for me now.
AS result, in my opinion, pod install give me old version of library.
from stompclientlib.
Can you try on Podfile:
pod "StompClientLib" , "1.3.1"
I've tried the latest version, oldest version etc but the result is the same. Too weird behaviour :(
I need to investigate it.
from stompclientlib.
Remove any pods, from Podfile and run pod install
add pod "StompClientLib" , "1.3.1" and run pod install again
pod install Analyzing dependencies Downloading dependencies Installing SocketRocket (0.5.1) Installing StompClientLib (1.3.1) Generating Pods project Integrating client project Sending stats Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
Check StompClientLib.swift :
/* Main Connection Method to open socket */ private func connect() { if socket?.readyState == .OPEN { // at the moment only anonymous logins self.sendFrame(command: StompCommands.commandConnect, header: connectionHeaders, body: nil) } else { self.openSocket() } }
It is still old one..
from stompclientlib.
And for your information, Spring Boot version is 2.1.6
from stompclientlib.
Okay, I'm going to upgrade the project with 1.3.2. I guess I missed one patch. I'm gonna write you down again.
from stompclientlib.
Hi again @xaeroolj ,
I've just published the new version. Can you try it?
Release 1.3.2
from stompclientlib.
Well, updated to 1.3.2
Installing SocketRocket (0.5.1)
Installing StompClientLib (1.3.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
but
no changes:
```
private func connect() {
if socket?.readyState == .OPEN {
// at the moment only anonymous logins
self.sendFrame(command: StompCommands.commandConnect, header: connectionHeaders, body: nil)
} else {
self.openSocket()
}
}
from stompclientlib.
Check folder:
StompClientLib-1.3.2/StompClientLib/StompClientLib/StompClientLib
This file is from prew versions, I believe that cocoa pods get this file..
Example is working because
Xcode project contain Example/StompClientLib.swift (correct)
And when we build this this file from the head have priority over.. StompClientLib-1.3.2/StompClientLib/StompClientLib/StompClientLi
from stompclientlib.
Okay, I will fix the folder path problem ASAP and release a new version after test it.
Thank you so much for the helping @xaeroolj :) If you have time to make a PR, I would love to accept that.
from stompclientlib.
@xaeroolj Helloo again,
A new release is alive, can you try and give me feedback that issue still exist?
from stompclientlib.
hello, I try it and the same problem still exist
from stompclientlib.
Okay, I fixed it this time @xaeroolj
Totally my bad, I updated the wrong StompClientLib.swift. So sorry about that :)
Can you please check the new release:
Release: 1.3.4
from stompclientlib.
Hi. Same problem with StompClientDidConnect on 1.3.7. version. Tried older versions, but always found nil when try openSocketWithURLRequest.
from stompclientlib.
Hello @ttansky, I've double checked the solution and it works on me. Can you share a reproducible minimal repo?
from stompclientlib.
Related Issues (20)
- Subscribe response HOT 3
- How can I access http response header (handshakeResponseHeaders) about handshaking? HOT 1
- Disconnecting after using autoReconnect HOT 15
- Add openSocketWithURLRequest connectionheader to websocket urlRequest's HTTPHeaderField and request additional connect function. HOT 4
- Cannot connect to socket HOT 3
- Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 403" HOT 4
- Add method/flag to stop logging HOT 6
- Subscribe Issue HOT 3
- Version 2.0 HOT 12
- Received bad response code from server 403 HOT 4
- Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 403" HOT 3
- Socket Disconnect after 30 min HOT 5
- misprint in code HOT 3
- Support for WatchOS HOT 2
- Swift Package Manager support? HOT 2
- Connection variable is not set to false when WebSocket receives DISCONNECT HOT 1
- Auto disconnection with error code 4500 HOT 2
- Facing Issue while sending the message HOT 1
- Privacy Manifest HOT 6
- Swift Package Manager Support HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stompclientlib.