How to mock scan QR UI testcases without opening Camera view in Swift iOS?

I have created application which having the Scan QR functionality, which will scan the QR and once scanning done will show the next screen.

I want to write the UI test case for scanning QR code without opening the Camera. I have explore and found the launchArguments option, but still not satisfied my requirement.

Is there any way to do this?
How to mock scan QR UI testcases without opening Camera view in Swift iOS?
 
 
Q