Ways to run a background task when the app is in foreground or background

Can someone tell me whether there are any API available for running a task when the app is in background ?

this is currently not possible to do in the app. best thing you can do is run it on your server or when app is foregrounded again.

we are working on background task support, see https://expo.canny.io/feature-requests/p/background-tasks-support

Thanks Brent.

A little off topic …a project generated via Expo can be run on an actual device (via Xcode) right ?

hey vpy, sorry i don’t understand the question, but it can probably be answered by the docs! docs.expo.io