your code works for Android but not for iOS. with iOS I use just tap last keyboard key whatever it is “Go”, “Next”, “Done”…
// java
WebElement keyboardLastKey = driver.findElement(AppiumBy.iOSNsPredicateString("**/XCUIElementTypeKeyboard[1]/**/XCUIElementTypeButton[-1]"));
// now tap on it whatever way you use in your code
I couldnt find iOSNsPredicateString(“/XCUIElementTypeKeyboard[1]//XCUIElementTypeButton[-1]”) on inspecting from Appium inspector. Is there a way to build iOSNsPredicateString ,like xpath?