Only load Swift modules when Shared Swift Runtime is available


I'm working on a library written entirely in Objective-C that targets macOS 10.11
I would like to refine parts of the app for Swift but I do not want to bundle Swift runtime.

Is it possible to compile and ship extensions written in Swift as part of the framework but only make them available when framework is linked against a binary with deployment tagert 10.14.4+ where Shared Swift Runtime is available?

Is it possible to compile and ship extensions

Can you clarify what you meant by “extensions” here. In the context of Swift on macOS, it’s a somewhat overloaded term (extension in the Swift language, app extensions and now system extensions, as another way of saying enhancements, and so on).

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple