title: Xcode export localization throws error "Argument list too long"
body: <p>I've got a very curious error to share regarding Xcode localization process. I will try to share as much detail as legally possible. </p>
  
  <p>From Xcode, I am trying to export an XLIFF file to send to our translators, via "Editor > Export for Localizations". However, this immediately throws error with the message:</p>
  
  <pre><code>The operation couldn't be completed. Argument list too long
  </code></pre>
  
  <p>This is indeed confusing, as I cannot find a more verbose log anywhere (I have already tried checking my Console.app). So, I spent quite a few time googling – to no avail. I couldn't find similar case like this. The error itself happens only when I am trying to export for localization. I can build and run the app just fine.</p>
  
  <h3>Facts</h3>
  
  <pre><code>~ $ xcodebuild -version
  Xcode 8.2
  Build version 8C38
  ~ $ xcode-select -version
  xcode-select version 2347.
  ~ $ echo $PATH
  /Users/david.christiandy/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/david.christiandy/arctools/arcanist/bin:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
  </code></pre>
  
  <ol>
  <li>I am using Xcode 8.2 on macOS Sierra 10.12.5.</li>
  <li>The error happens only when I try exporting from localization. This is also true when I run the localization process via <code>xcodebuild -exportLocalizations</code>.</li>
  <li>I can build and run the app just fine. (I believe) there's no problem with my header search paths.</li>
  </ol>
  
  <h3>Attempts</h3>
  
  <ul>
  <li>Thought there was something wrong in the code, so I tried to run the export process (via <code>xcodebuild</code> command) in a CI. Somehow, it's working. For the record, I am using Bitrise CI with the same stack as my system (Xcode 8.2.x, macOS 10.12)</li>
  <li>Asked colleagues to run export process on their machines, and they have the same error.</li>
  <li>This leads me to think that there must be something wrong with the configuration. So I made a standalone project to confirm that the export process fails consistently. Turns out, it works just fine!</li>
  </ul>
  
  <h3>So, the hypothesis I got currently is:</h3>
  
  <ul>
  <li>There's probably something wrong in the code, and</li>
  <li>There might be tools/software (that most of our iOS engineers installed) that might contribute to the error (since the CI completes just fine).</li>
  </ul>
  
  <p>I don't know why the CI can run the export process just fine, and I don't know when it might suddenly stop functioning (just like our local machines). </p>
  
  <p>Appreciate any help on this matter. Thank you!</p>