[go: up one dir, main page]

Skip to content

Frequently Asked Questions

Pawel Kadluczka edited this page May 31, 2023 · 9 revisions

How to create a hub proxy?

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.

How to use the client?

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:

The connection is being closed immediately after opening

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.

Does the client support automatic reconnection?

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.

How to receive data when the application is in the background?

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.

How to receive JSON?

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.