Access to the flash (light)

Hi there

Does anyone know if it’s possible to write a declare to access the flash independently to the camera so you can force the flash on when accessing the camera

Thanks

Chris

requires declares to access the AVCaptureDevice and manipulate the torchMode property

a simple Google search provides ObjC and Swift code that does this… and someone just needs to translate it into another of the multitude of declares required to make Xojo iOS usable.

Thanks Dave,

The flashlight is disabled in the OS when using the camera and the light is turned off, if it’s on, when you open the camera, so I thought there might be a restriction.

http://stackoverflow.com/questions/40099191/how-can-the-rear-camera-flash-be-forced-to-on-in-swift-3

Thanks Michel. I’ll chance my arm at applying it and see if I can get it going. If I do, I’ll post it here. Thanks for your time Michel and Dave

Hi Chris,
If you haven’t seen it already, access to the camera/flashlight is available in iOSKit. If you take a look at the example project there is a view dedicated to using the flashlight. If you run the project you should see it under AVFoundation demos. See here:
https://github.com/kingj5/iOSKit

If you have any questions please let me know.
Jason

Thanks Jason - exactly what I needed :slight_smile: