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
1
vote
0 answers

Swift 5: How do you add SSL Certificate to Starscream Websocket

I am using the latest tag 4.0.4 of Starscream (https://github.com/daltoniam/starscream). I have created my own SSL Certificate using openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365 On my backend, I use node.js to…
Sean Mayes
  • 158
  • 10
1
vote
1 answer

Starscream WatchOS connection

Can I connect to a WebSocket server in 2021 using WatchOS and StarScream on a real device? I found information that it is impossible to connect on a real device, but the information is old Unfortunately, I can not check on a real device, but it…
1
vote
0 answers

iOS StarScream, WebSocket sometimes does not reconnect on app foreground

This has been a real brain scratcher for us We know iOS closes WebSocket connections for apps in the background after a certain period of time. We noticed that every time this happens, and the app comes back to Foreground, our socket delegate…
A O
  • 5,516
  • 3
  • 33
  • 68
1
vote
1 answer

ObservableObject text not updating even with objectWillChange - multiple classes

I am currently writing a utility, and as part of this, a string is received (through WebSockets and the Starscream library) and the string value is then displayed in the SwiftUI view (named ReadingsView). The structure of the code is as follows -…
1
vote
1 answer

Websocket connection via starscream in ios

Currently I'm using Action Cable client to connect to the URL and subscribe to the channel. But the library seems to have some issues as its occasionally fails to subscribe to channel. Below is my current setup code for Action cable client func…
iOSDev2013
  • 67
  • 1
  • 6
1
vote
1 answer

How to fix "websocket is disconnected: Invalid HTTP upgrade" error using Starscream

I want to connect an iPhone to a web server running on my Macbook using MAMP and Starscream Library https://github.com/daltoniam/Starscream Installed using Cocoapods and set up the web server with this URL:localhost:8888 But I'm having a lot of…
JackieNBee
  • 173
  • 3
  • 18
1
vote
0 answers

VoiceProcessThread crash webRTC

My app crashes without any error log while calling gotICECandidate when remote candidates received. The exception I got from server is this. backtrace: (lldb) bt * thread #36, name = 'VoiceProcessThread', stop reason = EXC_BAD_ACCESS (code=1,…
Krutika Sonawala
  • 1,065
  • 1
  • 12
  • 30
1
vote
1 answer

RTCICEConnectionFailed swift

I'm trying to achieve audio calling with WebRTC. The pods I have are: pod 'Starscream', '~> 2.0.4' pod 'libjingle_peerconnection' When I try to send SDP received as an answer, it got failed. I'm here providing selected lines of code as it's too…
Krutika Sonawala
  • 1,065
  • 1
  • 12
  • 30
1
vote
4 answers

error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Starscream')

Steps to recreate $ vue init nativescript-vue/vue-cli-template transport $ cd transport $ npm install $ tns run ios --bundle Log error: error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Starscream') note:…
user2401543
  • 1,059
  • 11
  • 19
1
vote
0 answers

Sent SSL Certificate for Starscream returns error

I had a couple of tries to make a connection with SSL via Starscream but I got the same error for some reasons. Here are simples of connection and response client = WebSocket(url: URL(string: "wss://XXXXXXXX:443/")!) …
1
vote
0 answers

Connecting to WebSocket with Starscream in Swift

Just a quick question. I am to connect to a Server through a web socket, but I confess I have no previous experience with that technology, and little experience with networking in general. So, I am using StarScream, and, in AppDelegate I add this…
Danf
  • 1,409
  • 2
  • 21
  • 39
1
vote
1 answer

Chaining login operations with RxSwift

I'm creating an app that has a specific two-way authentication process: First, a REST based login with credentials, which returns a websocket endpoint on the server, plus an authtoken to use in order to connect to it. Only after the websocket has…
Cha.OS
  • 88
  • 10
1
vote
2 answers

How can I check if the socket is connecting or not using Starscream?

I use Starscream. How can I check the socket is connecting or not? isConnecting is a private property.
Maiko Ohkawa
  • 853
  • 2
  • 11
  • 28
1
vote
3 answers

Keeping socket open in Swift for chat application

I have a working chat server in Php/Ratchet. I am using Starscream as my client in Swift. I successfully created a chat between users however this only works when my application is open because this is when the socket is open. How do I make my app…
Ryan Murphy
  • 163
  • 1
  • 12
1
vote
2 answers

Socket self signed certificate handshake failure

I am using Starscream socket library and am trying to use WSS however I am having a handshake failure. I got my self signed certificate, I converted it to a .der file. Here is the code I am trying var socket = WebSocket(url: URL(string:…
AdamM
  • 4,400
  • 5
  • 49
  • 95