I’m building a framework to distribute features of my app to third parties. When I build the framework, I only want a select few of my header files to be shown publicly in the framework.
As far as I understand, the way to do this is to mark these headers as “Project” under the Copy Headers build phase in Xcode, which I have done. However, the headers are all being copied anyway.
I tried cleaning my project and rebuilding it. That didn’t fix the issue. I checked the headers folder and noticed that only the headers I had marked Public were getting updated (looking at the Last Modified timestamp), so I thought that maybe the ones left there were simply relics from previous builds. So I deleted those files, cleaned again, and built the project again.
That didn’t work either. Now I have new headers for ALL of the files (including the ones marked “Project”) and am out of ideas. Does anyone know what might be causing the header files to copy publicly when they’re marked “Project”? How do I fix this?
I had a same problem and then I have found this:
https://github.com/kstenerud/iOS-Universal-Framework
After using it I got only those headers that I wanted to be public to be public and all others to remain private.
Can’t recommend it enough.