Posts

Post not yet marked as solved
1 Replies
You have to wait for the ISO setting to be applied. That's why setExposureModeCustom allows you to provide a completion handler. The ISO you provide will only be in effect after the completion handler has been called.Also: You should put some code in the catch {}block. If you just leave it empty, all errors will be ignored and you won't even be notified... at least add a print statement and place a breakpoint on it.
Post not yet marked as solved
2 Replies
I have the same problem. I have described it in detail on stackoverflow.com: https://stackoverflow.com/questions/59289876/setexposuremodecustom-duration-iso-values-in-exif-data-do-not-matchTL;DR When locking exposure ISO and duration via setExposureModeCustom and then taking a photo, the exposure ISO and duration in the AVCapturePhoto's metadata (i.e. in the corresponding EXIF Tags) will often be completely different from the values provided to setExposureModeCustom.> If i apply ISO as 150, and after unlockForConfiguration method, if i print myDevice!.ios then i get value as 50.I can tell you why, probably. You have to wait for the ISO setting to be applied. That's why setExposureModeCustom allows you to provide a completion handler. The ISO you provide will only be in effect after the completion handler has been called. You don't seem provide a completion handler at all:myDevice?.setExposureModeCustom(duration: AVCaptureDevice.currentExposureDuration, iso: ISOvalue, completionHandler: nil)You should add one and put your print statement inside the completion handler. Then the ISO value should be correct.