title: How to remove file reference from Runner.xcodeproj
body: <p>I have a ruby code that uses xcodeproject that adds my Google-Info.plist to Runner.xcodeproj as a reference. However I want to remove the older reference because I get following error:</p>
  <pre><code>Xcode's output:
  ↳
      error: Multiple commands produce '/Users/figengungor/Documents/projects/app_gmo/base/build/ios/Release-iphoneos/Runner.app/GoogleService-Info.plist':
      1) Target 'Runner' (project 'Runner') has copy command from '/Users/figengungor/Documents/Base Firebase Files/GoogleService-Info.plist' to
      '/Users/figengungor/Documents/projects/app_gmo/base/build/ios/Release-iphoneos/Runner.app/GoogleService-Info.plist'
      2) Target 'Runner' (project 'Runner') has copy command from '/Users/figengungor/Documents/projects/app_gmo/base/ios/GoogleService-Info.plist' to
      '/Users/figengungor/Documents/projects/app_gmo/base/build/ios/Release-iphoneos/Runner.app/GoogleService-Info.plist'
  </code></pre>
  <p>Here’s how I add the Google-Info.plist reference:</p>
  <pre><code>require 'xcodeproj'
  project = Xcodeproj::Project.open(ARGV[0])
  main_target = project.targets.first
  gsi_reference = project.main_group['Runner'].new_file(ARGV[1])
  main_target.add_file_references([gsi_reference])
  project.save 
  </code></pre>
  <p>Here’s the me trying to delete but not being successful code(I’m not familiar with Ruby, tried to follow documentation):</p>
  <pre><code>old_gsi_reference = project.main_group['Runner'].find_file_by_path('/Users/figengungor/Documents/Base Firebase Files/GoogleService-Info.plist')
  old_gsi_reference.remove_from_project()
  </code></pre>
  <p>Does anyone have experience with xcodeproject and can help me out?</p>