1 Reply
      Latest reply: Oct 24, 2016 2:38 AM by eskimo RSS
      wholcman Level 1 Level 1 (0 points)

        Hi -

         

        I'm currently playing with websocket on ios.

        Is there any way to keep websocket connections when the app is in the background or the phone is locked ?

        I saw lots of tricky things like enable audio mode background or voip. Is it right with the ios guidelines ? even if my application is not an audio app..

         

        Besides, I need to get remote notifications in realtime time. Actually, it depends on the traffic and sometimes, I get a delay of 4-10seconds. No way to avoid this delay?

         

        Thanks.

        • Re: Realtime - Websocket background and remote notifications
          eskimo Apple Staff Apple Staff (5,995 points)

          Is there any way to keep websocket connections when the app is in the background or the phone is locked ?

          Not easily.  There’s nothing special about WebSocket here; under the covers it’s just a TCP socket and, as such, is subject to the general rules outlined in Technote 2277 Networking and Multitasking.

          Is it right with the ios guidelines ?

          App Review is pretty clear about their requirements here.  See clause 2.5.4 of the App Store Review Guidelines.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"