I would like to disable Proximity Monitoring, so that screen remains always ON, not matter how close something is to the sensor.
I tried it by using:
UIDevice.currentDevice.proximityMonitoringEnabled = NO;
Normally it is working as expected, however if I turn on VoiceOver, screen begins to black out if proximity sensor is covered.
FYI: I am making Video Call app (using CallKit) for people with low vision, and what they experience is that if they lean too close to the screen during a call, screen blacks out if VoiceOver is on.
I tried installing an NSTimer to set proximityMonitoringEnabled to NO every second (as a poor workaround), also tried setting it YES and then NO. It remains on NO, but screen still blacks out.
I think you have to change the session from
AVAudioSessionModeVoiceChattoAVAudioSessionModeVideoChat. Then the proximity sensor should get ignoredSomething like that should do: