IOS App keep screen on while charging

Hello.

I've noticed a few apps (e.g. Lightroom) have an option to keep the screen on while charging, for image sync.

I'm also working on a photo upload app and would like to have the same functionality, to allow users to keep the app running when upload large number of photos. I have searched the internet but have been unable to find a solution.

Do anyone know how to keep an app running indefinitely when the phone is plugged in?
IOS App keep screen on while charging
 
 
Q