Closed russnettle closed 6 years ago
Hi take a look at the similar old issue
@vldalx thanks for the reply - the issue is similar, unfortunately it is always nil and never receives a response with data
@russnettle you can check if the library receives any data from your backend
there is the method
https://github.com/AutosoftDMS/SignalR-Swift/blob/81fb366a856b33865c3fbf28d9edce289155d364/SignalR-Swift/Transports/WebSocketTransport.swift#L182
just add print(text)
or set a breakpoint here.
if it is invoked and text
parameter is not empty, then you can verify either the data format is wrong or the library is not able to handle it
@vldalx looks like the first response is an error message - which as per prev bug gets missed - subsequent calls are then empty
Unfortunately the error message is
{"I":"0","E":"There was an error invoking Hub method 'streaming.subscribe'."}
Which is strange as I have an identical project uses the SwiftR framework and is able to invoke the method fine.
Double check your code and the transmitted data. I use this library in my chat app. Everything is worked.
I had used SignalR-ObjC before I replaced the one with SignalR-Swift
. The code on the backend remained unchanged.
Hi @vldalx thanks - was a silly mistake - the arguments needed to be an array of arrays [[String]], cannot believe I missed this!
Hey,
Thanks for taking the time to port this lib, I was looking to migrate away from the SwiftR framework to use something non dependant on webviews etc. However I am facing an issue when calling invoke - the handler appears to be called twice, bit both times the value for data and error are nil here's how I am attempting to use signalR.
I saw another issue someone mentioned the first call being nil, but I am seeing both nil always. Any help would be appreciated, particularly if the call order etc is incorrect for this lib (as mentioned this works in another signalR lib)
Thanks!