Exposing Objective-C API to Swift inside a Framework (Private Framework API)

My framework has private Objective-C API that is only used within the framework. It should not be exposed in the public interface (so it shouldn't be imported in the umbrella header).

To expose this API to Swift that's within the framework only the documentation seems to indicate that this needs to be imported in the umbrella header?

Import Code Within a Framework Target

To use the Objective-C declarations in files in the same framework target as your Swift code, configure an umbrella header as follows: 1.Under Build Settings, in Packaging, make sure the Defines Module setting for the framework target is set to Yes.

2.In the umbrella header, import every Objective-C header you want to expose to Swift.

Swift sees every header you expose publicly in your umbrella header. The contents of the Objective-C files in that framework are automatically available from any Swift file within that framework target, with no import statements. Use classes and other declarations from your Objective-C code with the same Swift syntax you use for system classes.

I would imagine that there must be a way to do this?

Exposing Objective-C API to Swift inside a Framework (Private Framework API)
 
 
Q