title: Xcode 10 command-line building: Archive failed with Fabric Info.plist Error
body: <p>I have Jenkins server for autobuilding iOS project that has two targets.
  Project builds with command-line utility <code>xcodebuild</code>.</p>
  
  <p>Full commands are</p>
  
  <pre>
  /usr/bin/xcodebuild -workspace "Our project.xcworkspace"
      -scheme "First target"
      -configuration Release
      archive
      DEVELOPMENT_TEAM=TEAMCODE
      -allowProvisioningUpdates
  </pre>
  
  <p>and</p>
  
  <pre>
  /usr/bin/xcodebuild -workspace "Our project.xcworkspace"
      -scheme "Second target"
      -configuration Release
      archive
      DEVELOPMENT_TEAM=TEAMCODE
      -allowProvisioningUpdates
  </pre>
  
  <p>Before I did update Xcode to version 10 it works perfectly. But after updating each time I see error</p>
  
  <blockquote>
    <p>error: Fabric: Info.plist Error</p>
    
    <p>Unable to process Info.plist at path /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/Our_project-xxxx/Build/Intermediates.noindex/ArchiveIntermediates/Our project/BuildProductsPath/Release-iphoneos/First application.app/Info.plist
    This could be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved Our application.app from the location Xcode generated it. You can also add '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' as an "Input Files" dependency for your Fabric run script build phase.</p>
    
    <p>** ARCHIVE FAILED **</p>
  </blockquote>
  
  <p>After googling and reading error description I did open <code>Build phases</code> tab in Xcode and set up it (move <code>Run script</code> item to bottom, check <code>Run script only when installing</code> and add <code>$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)</code> to Input files and also remove empty <code>Run script</code> item).</p>
  
  <p>Manual building from command line now works - it seems like problem solved. Even Jenkins did build first target! But secong target did not with same error.</p>
  
  <p>I did open project, look Build phases tab and saw that <code>Run script</code> item moved above and new empty <code>Run script</code> appeared.
  After that I did experiment: set up Build phases, rebuild project in Xcode GUI and saw that phases reordered again. So, it occurs during or after building.</p>
  
  <p>How can I fix this bug?</p>
  
  <p>Say, can I order build phases manually from command line? If yes, I just append row in Jenkins step.</p>
  
  <p>In addition: this error appears only in command-line building. When I build project from Xcode GUI it always succeeds.</p>