Can't run Appium tests on iOS 10 on real device

Since updating my device and Xcode to iOS 10 and Xcode 8, I have been unable to successfully setup Appium testing on a real device. However, I works fine on the simulator. Below is my setup of capabilities:

DesiredCapabilities cap = new DesiredCapabilities();

File f = new File("/Path/App.ipa");

cap.setCapability(MobileCapabilityType.APP,f.getAbsolutePath());
cap.setCapability("bundleId", "co.xx");
cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.1");
cap.setCapability(MobileCapabilityType.UDID, "xx");
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6");
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
cap.setCapability(MobileCapabilityType.AUTOMATION_NAME,"XCUITest");

cap.setCapability("noReset", "true");

try {
    driver = new IOSDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), cap);   
} catch (MalformedURLException e) {
    e.printStackTrace();
} catch (Exception e) {
    e.printStackTrace();
}

I’m faced with the error below:

'An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: ‘xx’.

Solved the issues I was having.

I made sure to add the ‘xcConfigFile’ and the ‘realDeviceLogger’ to the list of capabilities.
Also had to reboot my device and set the certificates on the WebDriverAgent project appropriately.