Real IOS device, problem with screenshots

Hi,
I am running a test on a real IOS device with Appium using ios_webkit_debug_proxy. I am able to navigate to a url on my device using safari and even click a button. The problem is that when I take a screenshot I get an image of the appium. io site and not of the URL (google) I was navigating to. This is my code:

DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(“platformName”, “iOS”);
dc.setCapability(“deviceName”, “iPhone 7”);
dc.setCapability(MobileCapabilityType.TAKES_SCREENSHOT, “true”);
dc.setCapability(“platformVersion”, “11.2”);
dc.setCapability(MobileCapabilityType.BROWSER_NAME, “safari”);

URL url = new URL(“http://127.0.0.1:4723/wd/hub”);
RemoteWebDriver driver = new RemoteWebDriver(url, dc);

driver.get(“https://www.google.com/”);
Thread.sleep(1000);

driver.findElement(By.id(“lst-ib”)).sendKeys(“stackoverflow”);
driver.findElement(By.name(“q”)).submit();
Thread.sleep(3000);
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File(“screenshot.png”));
driver.quit();
Thanks!