title: Run a project without accessing frameworks for real devices
body: <p>I have an issue: I have built-in frameworks via "Frameworks, Libraries, and Embedded Content" that work only on real devices, while their source code is not available and I can't create version for simulator. However, I need to run the project on the simulator, and the functionality that is associated with the frameworks is disabled for the simulator with:</p>
  
  <pre><code>#if targetEnvironment(simulator)
  #else
  import MyFramework
  import MyFramework1 
  #endif
  </code></pre>
  
  <p>However, when we try to start the project in simulator mode, I get an error -</p>
  
  <blockquote>
    <p>Building for iOS Simulator, but the linked and embedded framework
    'Framework' was built for iOS.</p>
  </blockquote>
  
  <p>At Build Phases -> Link Binary With Libraries for my target I selected <code>optional</code> status for MyFramework and MyFramework1</p>
  
  <p>Any suggestion how to fix run for simulator without these frameworks are welcome!</p>