-
Notifications
You must be signed in to change notification settings - Fork 136
Frequently Asked Questions
If you need to create hub proxies then it means that you are using the previous (non-ASP.NET Core) version of SignalR. The current (ASP.NET Core) and the previous (non-ASP.NET Core) versions of SignalR are not compatible and this client only support the ASP.NET Core version of SignalR. You need to find a client that supports the previous (non ASP.NET Core) version of SignalR.
My Swift SignalR Client Course contains the most complete and up-to-date information on using and configuring the Swift SignalR Client, troubleshooting issues and more.
Older user's guides can be found here:
- Swift Client for the ASP.Net Core Version of SignalR – Part 1: Getting Started
- Swift Client for the ASP.Net Core Version of SignalR – Part 1: Beyond the Basics
- Automatic Reconnection in the Swift SignalR Client
Make sure that you keep a reference to the HubConnection
instance you created. If you don't the instance will be destroyed when it goes out of scope which closes the connection.
As of version 0.7.0 the client does support automatic reconnection. You can find all the details in the Automatic Reconnection in the Swift SignalR Client.
iOS does not allow to keep connections open when the application is in the background. If you leave a connection open the OS will kill it. As a result it is not possible to keep an active SignalR connection when the application is in the background. You need stop the connection when the application is backgrounded and re-open when it is brought to the foreground. More details here.
Ideally you should create an object that correspond to your JSON structure and the client will create an instance of this object based on the data received from the server. Alternatively, you can send JSON string from the server and receive it as a string on the client and handle deserialization yourself.