I want to intercept the proximity sensor without turning off the display.
I know by the documentation that I have two Bool variables:
proximityMonitoringEnabled
proximityState
and this code
[UIDevice currentDevice].proximityMonitoringEnabled = YES;
When the proximity sensor detects something it turns off the display, same way it does when you're holding the phone to your ear when on a phone call.
How do I keep the display on when the proximity sensor is covered?
Apple’s documentation notes that “Not all iPhone OS devices have proximity sensors.” To determine if the device your app is running supports proximity monitoring, set the proximityMonitoringEnabled property to YES, then check its value:
Source: http://www.whatsoniphone.com/blog/new-in-iphone-30-tutorial-series-part-4-proximity-detection/
Will help to detect current state of sensor.
Public API that allows screen dim:
Found here: Change to wantsSoftwareDimming in iOS 6?