Hi. Can I set a time and run any code at a specific time? For example after 2 days. But the application will not run or be in background mode. I've read about Background Tasks. But everyone runs their code in background mode (in-app run). I want to make that special time :) Thanks in advance
Run any code in specific time
Just a suggestion. Within your app, keep a list of time stamps and the code you would like to execute at that time. Then every few seconds/minutes, check the list and see if the current time stamp is greater than or equal to the ones in the list. If so, execute the code. That might be a little less error prone than trying to schedule a background task for two days in advance.
Can I set a time and run any code at a specific time?
What platform are you targeting? Background execution differs significantly between our platforms.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"