I have an alert controller which has an option that should fire a timer. After that time has passed, no matter if the app is in background or not, the action should execute. I have searched a lot about it and this is what a I've found so far:
- I tried using BGTaskScheduler, but it doesn't work as I expected. You can set the minimum time that should pass so the action fires after that. The problem is that is actually the system who decides when to fire that action and you can't determinate when it is going to do it (More information: iOS 13 - Using BGTaskScheduler doesn't work all the time)
- The other option that I have seen is using a normal timer. The problem is that I think the maximum time that a timer can run is 3 minutes in background. I need to run it for 30 minutes, 2 hours and 1 day.
Is there a way to achieve that goal?