Questions tagged [starscream]

Starscream is a conforming WebSocket (RFC 6455) client library in Swift for iOS and OSX.

Starscream is a conforming WebSocket (RFC 6455) client library in Swift for iOS and OSX. It's Objective-C counter part can be found here: Jetfire

Features:

  • Conforms to all of the base Autobahn test suite.
  • Nonblocking. Everything happens in the background, thanks to GCD. TLS/WSS support.
  • Simple concise codebase at just a few hundred LOC.

Github project: https://github.com/daltoniam/Starscream

61 questions
4
votes
1 answer

Integrate Apollo subscriptions on iOS with Action Cable being used on the backend for websockets

I'm trying to make Apollo subscriptions on iOS work with a backend that is using Action Cable to implement websockets. I learned that the iOS app needs to send command, channel and channel id to the backend to make subscriptions work (see here). I…
mir
  • 183
  • 1
  • 12
3
votes
1 answer

Why is Starscream not working anymore on real Apple Watch (WatchOS 6)?

Recently I upgraded my Apple Watch to WatchOS 6.0.1, my iPhone to iOS 13.1.2, Xcode to 11.1. MacOS still 10.14.6. I've created an Independent Apple Watch project where I test the communication between the Watch and a WebSocket server using…
JackieNBee
  • 173
  • 3
  • 18
3
votes
0 answers

How to keep Websocket connection opened while iOS App is in Background mode?

As the title says, how am I able to keep the connection open and receive messages even when the app is in the background? Because now, everytime i set it to background or i lock my iPhone and unlock it, the websocket gets disconnected. I've already…
3
votes
0 answers

How to connect to ASP.NET Core SignalR socket from iOS app using Starscream?

I am trying to build a simple real-time application, but when ever I connect, it disconnects after a few seconds. I am also assuming that there must be a way to invoke "Send" method that I implemented on the server. I know that there exists SignalR…
Adin Ljudina
  • 185
  • 2
  • 5
  • 15
2
votes
0 answers

Getting viabilityChanged error while integration of Starscream Websocket lib

Please check this below code. Every time I am receiving this case: .viablityChanged I don't know what is this error and why it's coming and how to solve this. I am using the Starscream Websocket lib.
2
votes
0 answers

How to connect Starscream iOS client to Java webserver

I'm running Spring Boot v2.2 with a correct WebSocketHandler(). I'm confident the server is correct because when I go to http://websocket.org/echo.html and attempt to connect to our server, we can verify connection on both the server and the browser…
doyeka
  • 31
  • 1
  • 5
2
votes
1 answer

Websocket being disconnected immediately after the connection

I'm using Starscream pod for handling chat functionality in my app. Once the websocket is connected, it's being disconnected immediately. I don't get any messages in the log console, but the info about disconnection can be seen on the…
2
votes
0 answers

Sending a file over Websocket with Starscream on Swift 4

I am wondering what the best option for sending a file would be. I have to upload a cvs file to a server to be processed and then wait for the results of the process. So far I convert the file to binary data like this: let data = try…
Danf
  • 1,409
  • 2
  • 21
  • 39
2
votes
1 answer

How to authenticate user using Starscream

I am stuck in user authentications; i want to authenticate user via username and password. I did successfully connect via websocket but i don't know how to authenticate user i try lot of research over google but still i can't achieved my goal due to…
2
votes
0 answers

Can not connect to websocket in iOS

Have a Traccar server at http://188.120.235.97:8082/, trying to connect websocket using Swift library Starscream (https://github.com/daltoniam/Starscream). There is my code: func connect(_ token: String) { var urlString =…
zzheads
  • 1,368
  • 5
  • 28
  • 57
2
votes
1 answer

How to create singleton for the WebSocket (Starscream)?

I am trying to create a singleton with WebSocket functionality and I just don't know why it's not working This is my singleton extension: import Starscream extension WebSocketManager: WebSocketDelegate { func websocketDidConnect(socket: WebSocket)…
user7644872
2
votes
1 answer

StarScream websocketDidReceivePong is not getting called for writePing

I would like to send periodic pings to server to keep the connection alive. This is the function to send ping socket.writePing(NSData()) But I am not getting the pong back func websocketDidReceivePong(socket: WebSocket){ wsConsole.text =…
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
1
vote
0 answers

Web Socket gets disconnected when app is in background

I am using StarScream library for socket connection. [https://github.com/daltoniam/Starscream][1] It is working fine as expected but as soon as app goes in background it gets disconnected immediately, i tried setting background process permission as…
Soniya
  • 600
  • 7
  • 34
1
vote
0 answers

iOS Websocket Connection to LG Smart TV with Starscream

I'm using Swift to connect an iOS app to a LG Smart TV (both on the same wifi network) via websockets and each time the connection gets a success message and then gets disconnected in less than a second. Below is the code I am using to establish the…
Eric S
  • 1,001
  • 10
  • 14
1
vote
0 answers

Swift background websocket by Starscream

I am a rookie in iOS, here I want to make a background WebSocket to deal with all of the events from the server. import UIKit import Starscream class WebSocketLink: WebSocketDelegate{ var isConnected:Bool = false func connect(){ …
Gomader
  • 11
  • 2
1
2 3 4 5