title: XCode Swift package manager error behind proxy
body: <p>We use Swift package manager embedded in XCode for the dependencies in our project. Everything works fine when using it on the local machine. However when I try to build the project on our ci slaves I get the following error (when run from both XCode and the console) :</p>
  <pre><code>xcodebuild -resolvePackageDependencies
  
  Resolve Package Graph
  
  Fetching https://github.com/hmlongco/Resolver.git
  
  xcodebuild: error: Could not resolve package dependencies:
    An unknown error occurred 
  </code></pre>
  <p>The difference between running it locally and on the ci slave is that the ci machines are configured behind a proxy. We already whitelisted all the URLs that were accessed when running this command, however the problem still persists. I couldn't find any detailed log about this error.</p>
  <p>From examining the network packages sent when I run the command we can still see that some app is trying to access the direct URL instead of going through the proxy and here timeout is received. We only use public packages on github and there isn't any authentication needed.</p>
  <p>From other side if the project is set up the old way using Package.swift and we run:
  <code>swift package resolve</code> the dependencies are successfully resolved without errors.</p>
  <p>I have already gone through the following but there wasn't any helpful solution:</p>
  <p><a href="https://support.apple.com/en-us/HT210060" rel="nofollow noreferrer">Configuration for enterprise networks</a> <br/>
  <a href="https://forums.swift.org/t/xcode-not-follows-system-proxy-settings-to-resolve-swiftpm-dependencies/34137/2" rel="nofollow noreferrer">XCode proxy settings</a> <br/>
  <a href="https://medium.com/cristian-ortega/using-swift-package-manager-in-real-life-projects-e80d60edd860" rel="nofollow noreferrer">SPM in real life projects</a> <br/>
  <a href="https://developer.apple.com/forums/thread/123380?answerId=628311022#628311022" rel="nofollow noreferrer">Same issue on developer forum</a> <br/>
  <a href="https://discuss.bitrise.io/t/xcodebuild-could-not-resolve-package-dependencies/13726" rel="nofollow noreferrer">SSH error resolving dependencies</a> - no ssh dependencies</p>
  <p>Also there isn't any documentation about how resolving the packages through XCode is different than using 'swift package'.
  Currently I'm not sure whether it's possible to configure something so XCode uses the proxy settings for SPM or the Xcode SPM through proxy is just not supported. Any ideas? Any help is appreciated!</p>