I use a third party Swift framework in my Swift app very often and would like to use it without having to write import ModuleName
in every single Swift file ove
Actually there's a very easy workaround I could have thought about earlier…
Simply add the following to your app project's Objective-C bridging header:
@import ModuleName;
Swift will pick it up too! No need for import ModuleName
in every Swift file where you intend to use the module.
No, there is no Swift analogue for Objective-C .pch
files.
One could ostensibly reduce the number of import statements by creating an umbrella target framework that includes a number of other modules, but there's no way to avoid explicit imports of dependent modules outright.