Header Files in CocoaPods
I previously wrote about how to create a custom CocoaPods repository. Now I've run into a new problem: how do you prevent users from importing header files they shouldn't need to touch? This Stack Overflow answer explains the difference between Public, Private, and Project headers in an Xcode sub-project. That's the right place to start. In a podspec configuration file, headers are -scoped by default. If you need headers to be or , you use and to expose them accordingly. Note: even if you use , those headers can still be imported in a project. So to truly prevent a header from being imported, just leave it as the default scope. For example: