title: How to turn iOS device display completely off?
body: <p>We are currently developing an iOS application which we need to run in Single App Mode with device lock deactivated. What we would like to have is that the screen turns completely dark and as soon as there is a socket/mqtt event or a touch event the display should brighten up.</p>
  
  <p>Everything works so far the only thing that is not perfect is that the display doesn't turn completely off using:</p>
  
  <pre><code>UIScreen.main.brightness = CGFloat(0.0)
  </code></pre>
  
  <p>Is there a way on how we could achieve that?</p>