I am developing an application that requires the proximity sensor constantly active during execution.
I put this code in the app delegate:
[UIApplication sharedApplication].idleTimerDisabled = YES;
[UIDevice currentDevice].proximityMonitoringEnabled = YES;
The problem is that after a short period of time even though the sensor is covered, the diplay lights up.
I have tried using third-party applications that make use of the sensor and the display remains dark.
Does anyone know how to fix it? thanks