IOS - real device : Failing to sign WebDriverAgent

I have some problem on signin WebdriverAgent. I read a lot of topic about it on github, SO, appium, and I don’t find any solution which work. It seems I lack an evidence for every other people.

First, configuration :
My config:

  • Mac 10.13.2
  • Xcode 8.3.3 (Was 9.2, downgrade to 8.3.3 to match tutorials about signin)
  • Appium Server Desktop App 1.7.2
  • Safari Inspector web activated on devices
  • ios_webkit_debug_proxy launched and showing my devices

My test code work on Simulator or real Android, but can’t be launched on real iphones.

Appium Log

Code :

  DesiredCapabilities caps = new DesiredCapabilities();
  caps.setCapability("platformName", "iOS");
  caps.setCapability("showXcodeLog", true);
  caps.setCapability("browserName", "Safari");
  caps.setCapability("deviceName", "iPhone6S");
  caps.setCapability("platformVersion", "10.1.1");
  caps.setCapability("udid", "48....3d");

  world.driver = new IOSDriver(new URL(APPIUM_URL), caps);

My last tries

I read and try to apply https://github.com/appium/appium/blob/master/docs/en/drivers/ios-xcuitest-real-devices.md (several times, I am on it since few days) and a lots of gihtub / SO pages about this problem.

Finally, after much effort, with the command xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=48....3d' test (in the PATH/appium/node_modules/appium-xcuitest-driver/WebDriverAgent)
I have an error I don’t understand neither find solution :

/usr/bin/codesign --force --sign 6029CB2949CE7DB7102268FA906584A8F43FABAC --preserve-metadata=identifier,entitlements,flags --timestamp=none /Users/fbou/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework
/Users/fbou/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1

Is there a real way to launch tests on real device with iOS ?
I assume I miss a very little thing that is obvious, but which one ?