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

Kim Strasser 1,036 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?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,044 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,414 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 30,666 Reputation points Microsoft Vendor
    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 Answers by the question author, which helps users to know the answer solved the author's problem.