can I build a camera app with night mode
Asked on 07/30/2024
1 search
Yes, you can build a camera app with night mode capabilities using the constant color API introduced by Apple. The constant color API is designed to help capture consistent color images even in challenging lighting conditions, which is essential for night mode photography.
Here are some key points to consider:
- Device Support: Ensure that your device supports the constant color API. Currently, the iPhone 14 family, iPhone 15 family, and 2024 iPad Pros are supported.
- Configuration: Configure the AV capture pipeline to deliver constant color images. This involves setting the appropriate session preset and flash mode.
- Flash Usage: The constant color mode uses the flash, so it will only work if the AV capture flash mode is set to auto or on.
- API Properties: Use the
isconstantcolorenable
property to request a constant color image. This property should be set at the start of your app along with other pipeline settings.
For more detailed information, you can refer to the session Keep colors consistent across captures.
Relevant Sessions
These sessions provide comprehensive guidance on how to implement and optimize your camera app for night mode photography.

Keep colors consistent across captures
Meet the Constant Color API and find out how it can help people use your app to determine precise colors. You’ll learn how to adopt the API, explore its scientific and marketing potential, and discover best practices for making the most of the technology.

Platforms State of the Union
Discover the newest advancements on Apple platforms.

Build a great Lock Screen camera capture experience
Find out how the LockedCameraCapture API can help you bring your capture application’s most useful information directly to the Lock Screen. Examine the API’s features and functionality, learn how to get started creating a capture extension, and find out how that extension behaves when the device is locked.