I have 2 projects, each of which creates one static library, as well as another project that uses both static libraries.
One of the two static libraries is building fine. The other is not, and the reason for this is that its public headers are not copied to the build folder until the user shell script is run.
Here is a demonstration of what is happening:
SampleA (the one that works)
Compile MyClass1.cpp ...
Compile MyClass2.cpp ...
Libtool /Users/user/Library/Developer/XCode/DerivedData/.....
Libtool /Users/user/Library/Developer/XCode/DerivedData/.....
Libtool /Users/user/Library/Developer/XCode/DerivedData/.....
Create universal binary libSampleA.a ...
Copy SampleA.h ...in /Users/user/....
Copy MyClass1.h ...in /Users/user/....
Copy MyClass2.h ...in /Users/user/....
Run custom shell script 'Prepare Framework'
Stripping libSampleA.a
--- Build complete
SampleB (one that DOES NOT work)
Compile OtherClass1.cpp ...
Compile OtherClass2.cpp ...
Libtool /Users/user/Library/Developer/XCode/DerivedData/.....
Libtool /Users/user/Library/Developer/XCode/DerivedData/.....
Libtool /Users/user/Library/Developer/XCode/DerivedData/.....
Create universal binary libSampleB.a ...
// >>>>> NO HEADER FILES ARE COPIED <<<<<<
Run custom shell script 'Prepare Framework'
--- Build fails (header folder does not exist)
My current setup is a workspace that includes all 3 projects, but I had 1 project with one sub-project for each static library. The problem that I have remains unchanged in both settings.
- , , .
- , , . . , , ().
- Debug, Archive ( , -)
"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include" / "$(PROJECT_TEMP_DIR)/../UninstalledProducts/include"- " > > " -
- "Build Phases > Copy Headers", Apple " " - .
- lib , " " -
- XCode mac -
, SampleB (, ) SampleA. , , .
, , :
, , ?
, " " " ", , . , , , , .