-2

User inactivity is not working when Screen off or phone lock state in my ios app I'm using this code in my project

https://stackoverflow.com/a/8994884/8569442

1 Answers1

0

Usually NSTimer is not suited to work in background.

You have to write workaround to put it in background task like here or use app delegate methods to do something you need after application is back in foreground like here.

tema-orange
  • 186
  • 1
  • 7