title: dlopen() dynamic library for iOS Simulator, in macOS application
body: <p>I have a "fat" framework built for iOS, which is being used in a debugging tool built for macOS. Previously I was linking this framework statically, which worked, even though XCode complains about it being built for the simulator (since the architecture is the same). But now, newer versions of the library are dynamic, so that route doesn't work, as the tool is a command line application, which doesn't support embedding frameworks.</p>
  
  <p>I could turn it into an application bundle, it seems, in order to solve that, but I'm not sure what this entails (creating a new project?). I can certainly figure it out but ..</p>
  
  <p>In the meantime, I thought I'd load the library dynamically using <code>dlopen()</code> etc and retrieve the classes/methods I need (I already have some code for this which at least compiles). However, that call fails with the following message:</p>
  
  <pre><code>no suitable image found.  Did find:
  /&lt;path to library file&gt;: mach-o, but built for simulator (not macOS)
  </code></pre>
  
  <p>Since linking statically is only a warning and actually works, is there a way to make <code>dlopen</code> work as well?</p>
  
  <p>Recompiling the framework itself is not an option for me in this situation.</p>