I'm working on a iOS application in which I need to perform a task in the app everyday at 8am. I need to perform that task in all the below three conditions of app which are,
- If app is running in the foreground.
- If app is running in the background.
- If app is neither running in the foreground nor in background (i.e. app is terminated).
I've handled the case 1 and case 2 but I've no idea how to handle the case 3. Please help. Thanks in advance.