It is not possible to keep the signalr connection alive while in the background on iOS. The operating system will kill it, there is nothing you can do to stop that from happening. iOS immediately kills the app (you have 5 seconds) when going into the background, with a few exceptions.
If you are using android, you can create a foreground service to keep the signalr connection alive. Without a foreground service, android will also kill the signalr connection after a while. Android will allow a background app to run for a period of time, then will kill it, so you must have a foreground service to keep signalr connection alive.
Also be aware while in debug, iOS will allow apps to run in the background. But the released version will not allow apps to run in the background. This can make debugging signalr difficult, as it will work in debug, but not in the production version.
You will probably need to use APN for notifications. Be aware that APN requires a HTTP/2 back end server if you want to send the push notifications directly to Apples servers. Or you can use FCM to send APN.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…