AVFoundation low-light mode to match native camera's

I'm trying to get AVFoundation to provide the same low-light boost provided in the native camera app.

I have tried:

  • isLowLightBoostSupported (which always returns false, regardless of my configuration)
  • setExposureTargetBias set to max
  • AVCaptureSessionPreset set to various options without success

Is automaticallyEnablesLowLightBoostWhenAvailable outdated? The documentation claims "capture device that supports this feature may only engage boost mode for certain source formats or resolutions", but with no explanation of which formats or resolutions. I can't tell if the option is no longer supported, or if there is some configuration permutation I haven't yet found.

Some additional info:

I can get a 1-second exposure using the following code snippet:

[myCaptureSession setSessionPreset: AVCaptureSessionPresetHigh];
[myCaptureDevice setExposureMode:AVCaptureExposureModeCustom];
[myCaptureDevice setExposureModeCustomWithDuration:[myCaptureDevice activeFormat].maxExposureDuration
        ISO:[myCaptureDevice activeFormat].maxISO
        completionHandler:nil];

The following snippet should allow up to 1 second exposure -- but it does not.

[myCaptureSession setSessionPreset: AVCaptureSessionPresetHigh];
[myCaptureDevice setExposureMode:AVCaptureExposureModeContinuousAutoExposure];
[myCaptureDevice setActiveMaxExposureDuration:[self.captureDevice activeFormat].maxExposureDuration];
[myCaptureDevice setExposureTargetBias:1 completionHandler:nil];

It seems that AVCaptureExposureModeContinuousAutoExposure tries to force you to do something sane, which is limiting the exposure duration to 1/30s. I have confirmed with exposureTargetOffset that the exposure level is far below its target. How can I force iOS to use longer exposures without implementing my own autoexposure algorithm?

AVFoundation low-light mode to match native camera's
 
 
Q