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:

  1. 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.
  2. Configuration: Configure the AV capture pipeline to deliver constant color images. This involves setting the appropriate session preset and flash mode.
  3. 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.
  4. 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.

can I build a camera app with night mode | Ask WWDC