I am developing an App for iOS/iPhone that communicates with an external hardware. The external hardware is a hotspot to which the iPhone connects and every 10 seconds this hardware sends data to the iPhone by opening a TCP connection on the local network to the indicated port.
On the iPhone side I use NWListener to retrieve the connections. When a connection is opened, I retrieve the data sent by the hardware and I close the connection.
Because I also need to have the exact position of the user I have activated the Location background mode using the CoreLocation framework.
If I put my application in the background everything works correctly. I retrieve the data every 10s as well as the changes in the user's positions.
After 15 minutes however, and it is very precise, the server (NWListener) no longer accepts connections as if there was a timeout or a limitation to having a server running in the background in an iOS application.
Can you help me? Thanks
Yes this is an AP with no connectivity. We use Wifi as a way of exchange data.
We discovered that there was an issue with CoreLocation that stops updating locations and the App goes into sleep.
So no network issue here in fact.
Thank you for you help !! your informations on "Extra ordinary network" was really useful !