Stay organized with collections
Save and categorize content based on your preferences.
Enabling the device's flash unit during an AR session can help improve
visibility.
Check that the current camera configuration supports flash
Not all camera configurations support enabling a flash unit.
Before enabling the flash or offering users the option to enable the flash,
ensure that the flash unit is available for the active camera
configuration:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[[["Using the device's flash during an AR session can enhance visibility in low-light conditions."],["Before enabling the flash, verify if the active camera configuration supports it by checking the `hasTorch` property of the `AVCaptureDevice`."],["Enable the flash by setting the `torchMode` property of the `AVCaptureDevice` to `AVCaptureTorchModeOn`."],["Disable the flash by setting the `torchMode` property of the `AVCaptureDevice` to `AVCaptureTorchModeOff`."]]],["To utilize the device's flash in an AR session, first verify if the active camera configuration supports it using `device.hasTorch`. If supported, enable the flash by setting `device.torchMode` to `AVCaptureTorchModeOn` after locking the device for configuration. If the camera doesn't support flash, setting `AVCaptureTorchModeOn` will have no effect. To disable it set the `device.torchMode` to `AVCaptureTorchModeOff` and unlock the configuration.\n"]]