One part of my app uses CreateML but I still need to test the UI on other screen sizes with the simulator. I tried using this condition but still get the same error.
#if os(iOS)
import CreateML // CreateML is not available when building for iOS Simulator. Consider using `#if os(iOS)` to conditionally import this framework when building for iOS.
#endif