uiAutomator is working fine for android but not iOS

I am trying to scroll to an element using the following code:

@AndroidFindBy(uiAutomator=“new UiScrollable(new UiSelector()).scrollIntoView(” + “new UiSelector().text(“Contacts”));”)
@iOSFindBy(uiAutomator=“new UiScrollable(new UiSelector()).scrollIntoView(” + “new UiSelector().text(“Contacts”));”)
public MobileElement orgContact;

This works perfectly in Android but on iOS I get the following error:
org.openqa.selenium.NoSuchElementException: Can’t locate an element by this strategy: Locator map:

  • native content: “By.IosUIAutomation: new UiScrollable(new UiSelector()).scrollIntoView(new UiSelector().text(“Contacts”));”

I have also tried to scroll using:
public void verticalScroll(AppiumDriver driver) {

	dimensions = driver.manage().window().getSize();
	Double screenHeightStart = dimensions.getHeight() * 0.5;
	int scrollStart = screenHeightStart.intValue();
	Double screenHeightEnd = dimensions.getHeight() * 0.2;
	int scrollEnd = screenHeightEnd.intValue();


But it also does not work.
Can anyone please suggest what am I doing wrong here