title: Dynamic library image doesn't contain x86_64, i386 architectures
body: <p>I'm trying to build dynamic library for iOS, combined with architectures </p>
  
  <ul>
  <li>armv7 </li>
  <li>armv7s </li>
  <li>arm64 </li>
  <li>i386 </li>
  <li>x86_64</li>
  </ul>
  
  <p>Here is my target's <em>Build Settings</em>
  <img src="https://i.stack.imgur.com/eFUYu.png" alt="enter image description here"></p>
  
  <p>As you can see I've added x86_64 and i386 to <em>Architectures</em> and <em>Valid Architectures</em>, also <em>Build Active Architecture Only</em> is set to <code>NO</code>.</p>
  
  <p>So after building my binary, I'm checking supported architectures by running <code>file myDl.dylib</code> in <em>Terminal</em></p>
  
  <pre><code>myDl.dylib (for architecture armv7):    Mach-O dynamically linked shared library arm  
  myDl.dylib (for architecture arm64):    Mach-O 64-bit dynamically linked shared library
  </code></pre>
  
  <p>So it means it has been compiled for <em>armv7</em> and <em>arm64</em>, and <code>dlopen()</code> fails on simulator with error "Unsupported architecture".</p>
  
  <p>What am I doing wrong?</p>
  
  <p><em>PS. When I use custom build script and use there "lipo" tool to create fat library, it works fine, but I don't like that way, and I want to get it normal working on Xcode.</em></p>