Friday, July 5, 2024
HomeiOS DevelopmentDealing with pomodoro logic in background (SwiftUI/iOS)

Dealing with pomodoro logic in background (SwiftUI/iOS)


I am engaged on a Pomodoro app for instructional functions. I take advantage of Timer for UI updates and making ticks each second to replace state time delta’s and utilizing time elapsed to calculate time remaining and all the logic. Nevertheless, once I decrease the app, it will get suspended. There isn’t a technique to run such Timer or do any background processing to replace state of pomodoro (and truly switching from work -> break and so forth).

I needed to make my pomodoro app to work in background and be capable to routinely change states and carry out different updates in addition to notify person about break time and so forth. (check out “Circulation” app for iOS)

  • Tried BackgroundTask, but it surely has it is personal limitations and needs to be used largely for community duties.
  • Tried Background Modes – Audio -> however that shouldn’t be used for different functions than taking part in video/audio, in any other case Apple can dismiss the app simply

How are these functions really being made? Is there any secret I ought to learn about?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments