03 October, 2017
Usually, you only need "Allow app extension API only" for expansion targets to be warned if you access APIs that are not available for extensions. I had made it possible for a framework to make sure I did not call the banned API.
I found this issue at the same time as this other issue because my client complained about both issues: Do not see any documentation through Quick Help also as the generated headline unnecessarily contains internal classes. This problem was already present in Xcode 8, as evidenced by someone asking for it at Stack Overflow.
Filed as rdar: // 34790796 and on Open Radar. The mentioned sample is on my Radar Samples GitHub repo, titled InterfaceTest.
For Swift-based frames / modules, Xcode generates a Objective-C header named Module-Swift.h . Usually this includes only public classes. But if you turn on "Allow only app extension API API," then internal classes are included.
Steps to Reproduce
- Build Module Form in the Specified Test Application with Xcode 9
- Inspect Module- Swift.h contained in the Manufactured Module.
- You will only see public classes CustomView and AncestorView
- Now turn on "Allow app extension API only" in Module Target build building settings and rebuild
- Check the same heading as in Step 1
Expected Results  The generated Objective-C header should be identical regardless of the state of this setting
- ] With the setting, only public classes appear
- With the setting on, you also see The Internal Class SwiftViewController
Version / Build
Version / Build
Xcode 9.0 (9A235)
Configuration  iMac or MacBo ok, with xcode 9 and macos 10.13
Categories: Error reports