the error comes if you use vision framework request in simulator.This specific feature does not work properly in the iOS Simulator due to hardware limitations, you can use a real device for running