What is libswiftRemoteMirror.dylib and why is it being included in my app bundle? : <p>I've got an iOS app which I've recently switched to Xcode 8.
As part of that we switched from swift 2.2 to 2.3 (swift 3 will come later).</p>

<p>I've got an automated build pipeline which essentially runs <code>xcodebuild</code> to produce a release binary on a dedicated build machine, and after I sorted all that out (Xcode 8's automatic code signing really screws everything up), now when I upload my app to iTunes connect, it fails with this error:</p>

<blockquote>
  <p>ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'MyApp.app/libswiftRemoteMirror.dylib' is not permitted. Your app can't contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at <a href="https://developer.apple.com/go/?id=bundle-structure">https://developer.apple.com/go/?id=bundle-structure</a> for information on the iOS app bundle structure."</p>
</blockquote>

<p>Sure enough, if I unzip the .ipa file and have a look, there's <code>libswiftRemoteMirror.dylib</code> sitting there.</p>

<p>If I archive/export for iTunes via Xcode, then it produces an app bundle which does not have <code>libswiftRemoteMirror.dylib</code>, however all other builds of my app appear to have it. Even just doing a debug build within Xcode, then looking at the output shows that libswiftRemoteMirror.dylib is sitting in my app's bundle, indicating that Xcode itself is definitely putting it there, not any part of my automated build script.</p>

<p>What is this file, why is it being put there, and what should I do about it?
I can modify my build script to delete this file for release builds, but I'm concerned that might affect the code signing process. I'll try it anyway and see what happens, but it feels like that's not quite the right thing to be doing.</p>

<p>Any advice would be appreciated.</p>
