For example, repeat
func getNewSentence() in the app every 24 hours so that it generates a new sentence/refreshes itself every day at midnight?
This is regardless of whether the user opens the app or not, so when they do open it the new sentence would appear. The sentence should be in the app for a 24 hours before renewing.
I was thinking of using
Timer() and adding it to backgroundAppRefresh but after some research it seems discouraged/bad practice.