In my app, i need to stimulate touch for my app on device. Does anyone know how to simulate touch on device using UITouch & UIEvent in swift?
Thanks in advance.
In my app, i need to stimulate touch for my app on device. Does anyone know how to simulate touch on device using UITouch & UIEvent in swift?
Thanks in advance.
Copyright © 2021 Jogjafile Inc.
It is wrong and impossible to simulate user actions programatically. UITouch & UIEvent APIs are meant to get data about touch event from user not to create your own. I suggest you to revisit your use case.
If you want to do this as a part of testing your UI, please look into XCUITests.