omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Background Operation

    Pythonista
    background
    3
    4
    3574
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • OTPSkipper
      OTPSkipper last edited by

      Is there a way to enable operation in the background?

      I have an app that receives a data stream from a socket over wifi from my sailboat. The problem is I am not interacting with the app all the time. I want to be able to put it down but still collect the data.

      When I close the top on my iPad right now it gets an io error on the socket after about 150 seconds.

      1 Reply Last reply Reply Quote 0
      • Niall
        Niall last edited by

        Apple is very precious about background services, and there was a point a few years ago where they cracked down heavily on app developers using background processing for convenience rather than strict need.

        In order to get through app approval, you have to have a very strong case for allowing background operation, and I'd be very surprised if Pythonista would have got through approval with an open API for background tasks that would basically allow anyone to do anything they feel like...

        1 Reply Last reply Reply Quote 0
        • dgelessus
          dgelessus last edited by dgelessus

          If you only need the iPad to stay active, you can use the console.set_idle_timer_disabled function to prevent the iPad from locking automatically. If you want to close the cover without locking the iPad, I think there's an option in the iOS settings. Then you can leave the iPad unlocked with the cover closed and Pythonista will run forever. (You may want to turn down the screen brightness when you do that, so the battery drains less quickly.)

          1 Reply Last reply Reply Quote 0
          • OTPSkipper
            OTPSkipper last edited by

            I think just keeping the iPad active will be enough. I don't really need it to run in the background. Thanks!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors