New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to run tap scenario #390
Comments
It only worked on |
yes I am launching with |
This is correct. The reason for this is that the process that is responsible for booting the simulator, owns the rights to write to the mach port that actually sends the HID events to the simulator. You can either use the HID Socket functionality to pump HID events to the simulator, or with the HTTP server. It's currently not possible to do this from another process. |
This is how I ended up sending a tap action through the socket in case you get the HID connection working. ( echo '{"x":150,"y":100,"class":"touch","type":"down"}' | nc localhost 8091 && \
sleep 0.2 && \
echo '{"x":150,"y":100,"class":"touch","type":"up"}' | nc localhost 8091 |
@ssynix that looks similar to what I have locally. A socket should work well with other languages like python, though I haven't gotten round to adding this to the fbsimctl e2e tests. |
Sorry i was away for day. I just tests this and it works. thanks @ssynix & @lawrencelomax. |
There's pretty decent documentation in the header files and commit messages, so that's the first place I look. For HID stuff, see here. |
Thanks @ssynix . I will go through it. |
I'd like for this to eventually documented, but for now this API is in its early stages. I'm confident that keeping line terminated json will stay, as well as keeping the primitives the same. Higher level gestures can be built on top of this. For a real-time API, simple primitives make the most sense as it will be easy to convert to UI events in a browser or native application. If there's anything else you'd like to know, please reopen. |
@lawrencelomax I see protocol changed here. So tried this |
actually issue was with my parsing logic. It still works :). Sorry to bother. |
Cannot pass hid port on launch. fbsimctl is not accepting hid port? Is something changed?
Any ideas? |
Could you try booting with |
I have tried both (with and without |
One of the recent commits is: Change --hid to --socket |
Good point, there has been a bunch of recent changes here. Main reason for doing so is that some of the functionality of Additionally, the way that actions can be wired over a socket are being consolidated so that |
./fbsimctl <udid> tap 200.0 200.0
. it always sayCould not connect to HID, it must be provided on launch
. I did passhid
port on launching simulator. Am I missing something?The text was updated successfully, but these errors were encountered: