I am writing an application for a client in which users will enter data during the day, and then at a certain moment of the night (for example, at midnight) user data for that day should be uploaded to the server.
Therefore, I need to plan a method to run in my application at midnight, even if the application is in the background. This method then synchronizes the collected data with the server and downloads any changes.
To achieve this, I assume that I need to configure the application to always run in the background (i.e. more than 10 minutes), and then plan the function to run after a certain time. I do this using performSelector: withDelay: :? Or do I need something more reliable because the application will be in the background?
Thanks guys!
source share