iosxcodemacoscontinuous-integrationosx-server

Xcode Server OTA Install: "cannot connect to server.local"


I cannot get the "Over The Air" installation of iOS apps to work using the latest version of macOS (10.12.5) and Xcode Server (5.3.1). I can create Xcode Bots and the integrate without any issue, but it always fails with "cannot connect to server.local" when trying to install the app from any device. The "Xcode Server OTA Installation" profile is installed. I can download the archive and product using Safari on the Mac without a problem. In summary, everything work but the OTA installation always fails.

Tried on two different Macs already, also with a complete clean installation of macOS before.

Versions: macOS 10.12.5, Xcode 8.3.2 and Server 5.3.1

I found several old reports of this problem but all the workarounds didn't seem to help.

Same problem on Xcode 9 beta 1 with the now built-in Xcode server.


Solution

  • For iOS 10.3 and later, a reason why fails, in some cases, with "Cannot connect to *.local" is that self-signed certificate shall be trusted manually in Settings on test devices (eg. iPhone).

    Steps as follow:

    1. Install self-signed certificate(s) from Xcode server's bots page on your iPhone;
    2. Go to iPhone's Settings->General->About->Certificate Trust Settings;
    3. Find your server's self-signed certificate(s) under section ENABLE FULL TRUST FOR ROOT CERTIFICATES, and turn the switch ON;
    4. Visit bots page on Xcode Server, click install.