Is it possible to adjust the screen dimmer and the lock screen on iOS?

Kim Strasser 1,631 Reputation points
2024-08-18T09:32:13.4266667+00:00

Is it possible to adjust the amount of time until the screen dimmer starts on iPhone/iPad while my game is running?

Is it possible to adjust the amount of time until the lock screen on iOS is activated while my game is running? Is it allowed to deactivate the lock screen when my game is running so that the lock screen is not automatically executed after some time?

Developer technologies | .NET | .NET MAUI
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,451 Reputation points Microsoft External Staff
    2024-08-19T03:01:00.5833333+00:00

    Hello,

    As I understand, you want to avert system sleep, right? If so, please set idleTimerDisabled.

    UIApplication.SharedApplication.IdleTimerDisabled = true;
    

    For more details, please refer to Apple's doc- idleTimerDisabled | Apple Developer Documentation

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.