The iOS Simulator User Guide lists the limitations of the simulator.
It states that camera (and so the barcode scanner) can only be tested on a real device.
However you could capture some scanning results on a real device and use them to test your code in the simulator.