Skip to content

Commit

Permalink
Merge pull request #13 from gaelfoppolo/feat/ios/idleness/idle-timer
Browse files Browse the repository at this point in the history
Idleness > Idle Timer
  • Loading branch information
olegoaer authored Mar 8, 2023
2 parents f779b77 + 1453963 commit 99898f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ problem, or that there might be a better way of writing the code. Therefore, the
Name | Detailed Description
---|---
*Idleness* |
Idle Timer | To avoid draining the battery, an iOS device that is left idle quickly falls asleep. Hence, keeping the screen on should be avoided, unless it is absolutely necessary. Developers typically set the `UIApplication#isIdleTimerDisabled` property to `true`, to avert system sleep.
Rigid Alarm | Setting a tolerance for timers will allow them to fire later than the scheduled fire date. The system will use this flexibility to shift the execution of timers by small amounts of time, within their tolerances, increasing the ability to optimize power savings. Your app can set the `Timer#tolerance` property to specify a tolerance for a timer. Using this approach dramatically increases the amount of time that the processor spends idling while users detect no change in system responsiveness.
*Power* |
Charge Awareness | It's always good that an app has different behavior when device is connected/disconnected to a power station, or has different battery levels. Your app can query the `UIDevice#batteryLevel` and `UIDevice#batteryState` properties at any time to determine the level of charge and the state of the battery. Your app can also register to receive notifications when the battery level or state changes, using `batteryLevelDidChangeNotification` and `batteryStateDidChangeNotification`.
Expand Down

0 comments on commit 99898f2

Please sign in to comment.