title: Xcodebuild fails in jenkins with cocoapods
body: <p>I am using the xcode plugin.
  I had looked around, but most of the "solutions" did not work.</p>
  
  <p>My main issue is that in the xcworkspace that is generated, there is no scheme for the project I am trying to build. The plugin does the command </p>
  
  <p><code>$ /usr/bin/xcodebuild -list -workspace Project.xcworkspace</code></p>
  
  <p>and the output only shows the Pod's schemes, not the main project scheme.</p>
  
  <p><code>Information about workspace "Project":
      Schemes:
          Pods
          Pods-AFNetworking
          Pods-Bolts
          Pods-Facebook-iOS-SDK</code></p>
  
  <p>I have the cocoapods buildstep with <code>pod install</code></p>
  
  <p>I put this as the Xcode plugin configs: Target: Project, clean before build, Configuration: Debug, Xcode schema file: Project, Xcode workspace file: Project, Build output directory: ${WORKSPACE}/build.</p>
  
  <p>This is the error that gets printed out:</p>
  
  <pre><code>Going to invoke xcodebuild:, scheme: Project, sdk: DEFAULT, workspace: Project, configuration: Debug, clean: YES, archive:NO, symRoot: DEFAULT, configurationBuildDir: /Users/ignat/.jenkins/workspace/Project/build, codeSignIdentity: DEFAULT
  [Project] $ /usr/bin/xcodebuild -scheme Project -workspace Project.xcworkspace -configuration Debug clean build CONFIGURATION_BUILD_DIR=/Users/ignat/.jenkins/workspace/Project/build
  Build settings from command line:
      CONFIGURATION_BUILD_DIR = /Users/ignat/.jenkins/workspace/Project/build
  
  xcodebuild: error: The workspace 'Project' does not contain a scheme named 'Project'.
  FATAL: Build directory does not exist at /Users/ignat/.jenkins/workspace/Project/build. Potential configuration issue.
  Build step 'Xcode' marked build as failure
  Finished: FAILURE
  </code></pre>