Our app supports iOS 12 and up, however we have two new local frameworks "Jello" and "Wizdom" within the app, but they only support iOS 13 and later (so they can use Combine and SwiftUI).
The app weakly links against Jello, Wizdom, Combine, and SwiftUI. The app's main BaseUI module is what actually imports Jello. BaseUI supports iOS 12 and up so it also weakly links against Jello etc.
However we're running into a problem where BaseUI won't compile because of the error: Compiling for iOS 12.0, but module 'Jello' has a minimum deployment target of iOS 13.0.
How can I make the import conditional on iOS 13 being available (i.e. don't import it if iOS 13 is not available)?
(So far the only workaround I've found is to create an Objective C wrapper around Jello and access it through that wrapper, but this is awkward and kludgy. I also tried wrapping that whole file with #if canImport(SwiftUI) ... #endif however this also doesn't work because it seems that this is just a compile-time check.)