So I made an app using swift and swift ui and need to get the next item in an array, retrieved from firebase, every day. Think of it like how the Wordle site gets a new word every day at a certain time. I looked everywhere for how to accomplish this, but it simply didn’t exist.
2
Answers
There are many ways to perform a task every day at a certain time in Swift. Here are some of the most common:
Use a timer.
Use an alarm.
Use a calendar.
Use a repeating task.
You can use Firebase schedule functions. Write a function that will be triggered in every 24h. (But not sure if this is included in their free plan). This answer also discusses some alternative options u can use to achieve the above result.