I am attempting to write a Neovim plugin that can use idb, a tool to interact with iOS simulators (mainly for automated testing) in a scriptable manor. I want to be able to show a telescope.nvim search box with all the interactable elements on the iOS simulator screen, so I can avoid using the mouse when interacting with the simulator.
Use your standard plugin manager (however there is very little here so far so not much point).
- idb (needs Python 3)
- telescope.nvim
require("nvim-idb").setup()
:lua require('telescope').extensions["nvim-idb"].get_elements()
This will probably not work correctly! But if you want to try it then go ahead.nvim
:IDBStartSession
- This is a very experimental mode to start an IDB "session". This will "take over" your vim session; it will remap various keys to manipulate the simulator:
j
- scroll down on simulatork
- scroll up on simulatorf
- show element picker in Telescopet
- tap on specifc point. Pass inx y
with a space or a comma. E.g650,2600
,650, 2600
or650 2600
should all work.
- repeat last interacterable command (i.e something that produces a UI output on the screen)H
- swipe back on the simulatorr
- restart app<c-n>
- when focussed on an input, press<c-n>
to simulate pressing 'next' or 'submit' on the iOS keyboard. (Currently won't focus the next input in IDB, but will submit a form if it's the last element)<esc>
- Quit this mode and return mappings to vim
I think this could be pretty powerful. I have some ideas on other mappings or features (most of which already exist in vim!) I could add:
-
gg
andG
to scroll to top/bottom of content in the simulator -
10j
- bigger motion events - - record and play macros (?!) - record a sequence of events in the Simulator and then play it back later (persisted across IDB sessions of course!)
-
/
- search for item on screen and scroll to it