iOS equivalent to android keyevent

I have a situation where the screen can’t be inspected due to security issue. The screen has numeric digits and a done mark to select the pin and confirm done. I was able to do it on android by using KeyEvent. So I basically pressed the 6 digit pin and then tabbed through the displayed app keyboard till the end and then pressed enter which selected the done key

My question is how I can simulate it in iOS? I could not find any equivalent. I understand it has only sendkeys which would require the keyboard. But in my case, the keyboard is not shown. Any help would be appreciated.