title: C API for a Swift framework – always exposed?
body: <p>I am building a iOS SDK in Swift 5.3, and I define all classes (except the documented API) as <code>internal</code> (i.e. using the default access wherever I cannot use <code>private</code>). The SDK is distributed as a cocoapod dynamic framework. So far so good.</p>
  <p>My SDK has a <code>C</code> component; these functions are used internally for some calculation, and are not expected to be exposed to the app developers. These are exposed to Swift via the unmbrella header, and my Swift code works with them as expected. Unfortunately, they are also exposed by the Framework, and an app that imports my framework, can call these <code>C</code> functions. They are even displayed as suggestions in code completion.</p>
  <p>I thought that I could declare these functions in a separate file and declare it as a <strong>Project</strong> Header, but alas, these functions cannot be called from my Swift classes.</p>
  <p>The last resort is, probably, to manipulate the file header while copying it to the Framework. Am I missing something? Are there better ways to obfuscate the internal C functions?</p>