iOS Question TCP Connection when Phone call is received & app is swapped

Discussion in 'iOS Questions' started by aaronk, Feb 14, 2015.

  1. aaronk

    aaronk Well-Known Member Licensed User

    Hi,

    If I am using a TCP socket in my app and it's connected to a device, what would happen if the user gets a call or the user double presses the home button and swaps apps and then they re-open the app again ?

    I am guessing the TCP socket will disconnect since Apple doesn't allow the connections to be open in the background and I would need to re-connect the socket again when the user re-opens the app again ?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    That is correct. There are three possible scenarios:
    1. The process keeps running and the network connection is kept alive.
    2. The process keeps running but the network connection is broken.
    3. The process is killed.

    Your app should correct handle AsyncStreams events and reconnect when it is active.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice