I created a scene to present weekly goals. I count up a variable each second a user is using my App and save it to the UserDefaults. How can I reset(Set to 0) each Monday at 6PM in order to reset the 'weekly' goal automatically in the background whether the App is terminated or not? I would also include a Usernotification. Can I even execute code within the Usernotification? I'm using SWIFT.
Thanks for any help!