SignalR cannot sustain a connection when a .NET MAUI app is in the background on iOS
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
When using SignalR clients in an .NET MAUI application on iOS, SignalR cannot sustain a connection to the server if the app it's running in enters the background. As a result, SignalR messages will not be received when the app is running, but not in the foreground.
Presently, there seems to be no way to integrate SignalR (on .NET MAUI for iOS) with Apple's background task system for iOS apps, which would let it keep running (perhaps at a slower rate?) when the app was not in the foreground.
### Expected Behavior
On Android using .NET MAUI, SignalR is able to sustain a connection while the app is in the background, and even while the device is asleep. It would be ideal to bring SignalR on iOS using MAUI up to feature parity with Android.
### Steps To Reproduce
1. Create an .NET MAUI app that uses SignalR to connect to a server.
2. Run the app on a physical iOS device.
3. Return to the home screen. The connection will not continue while the app is in the background.
### Exceptions (if any)
_No response_
### .NET Version
9.0.310
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.