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:
#if targetEnvironment(simulator)
#else
import MyFramework
import MyFramework1
#endif
However, when we try to start the project in simulator mode, I get an error -
Building for iOS Simulator, but the linked and embedded framework 'Framework' was built for iOS.
At Build Phases -> Link Binary With Libraries for my target I selected optional
status for MyFramework and MyFramework1
Any suggestion how to fix run for simulator without these frameworks are welcome!