I tried to use my Macbook camera in the iOS simulator via Rocketsim. Unfortunately it looks like the Rocketsim Virtual Camera does not support setExposureTargetBias.
I use an external framework that uses the camera (Innovatrics DotFace SDK) and it looks like it is calling this function.
Here is log from the crash:
Document capture started
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[RocketSimCaptureDevice setExposureTargetBias:completionHandler:] Not supported - use -isExposureModeSupported: to discover valid exposure modes'
*** First throw call stack:
(
0 CoreFoundation 0x0000000180491128 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018008412c objc_exception_throw + 56
2 AVFCapture 0x00000001c7616acc -[AVCaptureDevice isAdjustingExposure] + 0
3 DotCamera 0x000000010487e100 __swift_memcpy16_8 + 11320
4 DotCamera 0x000000010487f0a4 __swift_memcpy16_8 + 15324
5 DotCamera 0x000000010487e868 __swift_memcpy16_8 + 13216
6 RocketSimConnectLinker 0x0000000107e0b7c8 $sTa + 44
7 RocketSimConnectLinker 0x0000000107e0a3fc $sSo15AVCaptureOutputCSo17CMSampleBufferRefaSo0A10ConnectionCIegyyy_AbdFIegggg_TR + 20
8 RocketSimConnectLinker 0x0000000107e0a3c4 $s22SimulatorCameraSupport0A15VideoDataOutputC12processFrame12sampleBufferySo08CMSampleJ3Refa_tFyyYbcfU_ + 340
9 RocketSimConnectLinker 0x0000000107df3dec $sIegh_IeyBh_TR + 48
10 libdispatch.dylib 0x000000010696c0f0 _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x000000010696d93c _dispatch_client_callout + 16
12 libdispatch.dylib 0x0000000106975bd8 _dispatch_lane_serial_drain + 916
13 libdispatch.dylib 0x000000010697691c _dispatch_lane_invoke + 420
14 libdispatch.dylib 0x00000001069832f8 _dispatch_root_queue_drain_deferred_wlh + 324
15 libdispatch.dylib 0x0000000106982754 _dispatch_workloop_worker_thread + 488
16 libsystem_pthread.dylib 0x0000000105e0eb88 _pthread_wqthread + 288
17 libsystem_pthread.dylib 0x0000000105e0d98c start_wqthread + 8
)
libc++abi: terminating due to uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[RocketSimCaptureDevice setExposureTargetBias:completionHandler:] Not supported - use -isExposureModeSupported: to discover valid exposure modes'
terminating due to uncaught exception of type NSException
CoreSimulator 1048 - Device: 15plus (8E4879D0-614A-43D0-8010-CE2AF4547395) - Runtime: iOS 17.2 (21C62) - DeviceType: iPhone 15 Plus
Reported by A. Daniel via mail
Reported by A. Daniel via mail