iOS Question How to keep App running in background

Discussion in 'iOS Questions' started by Markos, Oct 4, 2018.

  1. Markos

    Markos Active Member Licensed User

    Hi All,

    I want to have my app running even when the phone screen saver or power saving kicks in. Please direct me to a tutorial or example thanx
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    There are only very specific things that you can do in the background. Why do you need your app to run in the background?
     
  3. Markos

    Markos Active Member Licensed User

    I made a chatserver that is on Windows, Android and now iOS. So tcp sockets need to be awake to trigger events
     
  4. Markos

    Markos Active Member Licensed User

    There are 2 scenarios.
    1. No users connected but App has to wake up upon receiving connection tequest at socket level

    2. Users connected and App must respond to active connections as well as new connect requests. Does this fall into any existing category to permit background processing?

    Running phone devices as server opens up a world of posdibilities in the realm of mass server distributed server farms I would humbly think?

    Cheers for your help as always and guidance
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Not possible. You should use push notifications.
     
  6. Markos

    Markos Active Member Licensed User

    Will the push notifications permit persistent access or only wake the App for new connection requests. Will it sustain users already connected or close sockets when pushed to the background or sleeping.?

    A text server or multimedia server uses same principle I would think.

    Ok so for the ftp example how would I ensure connected users dont get cut off while transfering files or idle for 60secs. Or is it expected they must logon over and over as the server gets pushed to the background?

    I appreciate and respect apples policy but it surely restricts owners of devices to maximise the potential of their purchaced equipment I must say. Unless Im totally clueless on the solution you suggest and Im missing the perfect fit as the push notification is new to me
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    The answer to your original question is that you cannot keep your app running in the background.

    Your app can request to run for a few minutes when it transfers to the background. Nothing more.
     
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