title: Target Integrity Issue: "Building for iOS, but the embedded framework 'X.framework' was built for iOS Simulator"
body: <p>Our organization distributes iOS pre-compiled dynamic frameworks using the method which we understood to be previously canonical prior to Xcode 11.4.  It involved building two pre-compiled frameworks, one for device and one for simulator, and then having the correct one used at runtime.  The latter involved modifying "Other Linker Flags" to select only the framework which should be used depending on how "Any iOS Simulator SDK" and "Any iOS SDK" were set, and adding a new run script phase to the Build Phases which strips out the simulator slices from device builds.</p>
  
  <p>When moving to Xcode 11.4, we now encounter the target integrity error:</p>
  
  <blockquote>
    <p><strong>"Building for iOS, but the embedded framework 'X.framework' was built</strong>
    <strong>for iOS Simulator."</strong></p>
  </blockquote>
  
  <p>We gather than migrating to XCFramework is one way to solve this problem.  But for those people who wish (or need) to continue for now to use earlier versions of the pre-compiled frameworks build as dynamic frameworks, what can be changed in the project settings to overcome this error?</p>