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.
When moving to Xcode 11.4, we now encounter the target integrity error:
"Building for iOS, but the embedded framework 'X.framework' was built for iOS Simulator."
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?
Through talking with Apple we concluded that this flaw was by design, and that a migration from dynamic frameworks to xcframeworks was essentially required. If there's a technical way around this problem, we never found it.