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
-
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.
-
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...
-
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.) -
I think just keeping the iPad active will be enough. I don't really need it to run in the background. Thanks!