Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Device.Timer still runs in the background (after OnSleep)

OdyseeOdysee Member ✭✭

I realised this first when debugging my app on the ios13 for the first time BUT it behaves the same way for 10, 11 and 12, just doesn't work the same way with debugger.

I can't find anything about this "bug" in the documents. I want it to behave the same way as on Android i.e. OnSleep freeze everything on the App.

Some guidence on the subject. The App has a lot for timers running.

Yours T.

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    Well, IOS system has backgrounding task . From iOS Backgrounding with Tasks,we will find:

    But Tasks are under a strict time limit, and typically get about 600 seconds (10 minutes) of processing time after an application has moved to the background on iOS 6, and less than 10 minutes on iOS 7+.

    So, even if you go back to the desktop(OnSleep() is running. ), some tasks will run in the background for a while.

  • jezhjezh Member, Xamarin Team Xamurai

    @Odysee Have you resolved your question?

  • tomas_svestkatomas_svestka Member ✭✭

    Anyone has an answer on what is the right way to stop timers when app enters background and re-enable them when it resumes?

Sign In or Register to comment.