I'm writing an app for a client where the users will enter data during the day, then at a given point at night (say, at midnight) the user's data for that day should upload to the server.
Therefore I need to schedule a method to run on my app at midnight, even if the app is in the background. This method will then sync the collected data with the server and download any changes.
In order to achieve this, I imagine I need to set the app to always run in the background (i.e. longer than 10 minutes) then schedule the function to run after a specific time. Do I do this by using performSelector: withDelay:
? Or do I need something more robust because the app will be in the background?
Thanks guys!