Archive header path missing InstallationBuildProductsLocation/usr/local/include

I recently refactored a bunch of code. I split the original ios app into a couple of frameworks so that I could reuse them. I am able to build and run in the simulator and on my test devices. I can not build an achive


My build dependecies are


iOSApp -> CommonFramework -> Static lib


When I build iOSApp for archive I noticed that the publis static lib header files get copied


CpHeader STW.h ~/Library/Developer/Xcode/DerivedData/iOSApp-fzfjswokuxdnzucfawrmvgtbhuep/Build/Intermediates.noindex/ArchiveIntermediates/iOSApp/

InstallationBuildProductsLocation/usr/local/include/STW.h


When CommonFramework builds I get an error can not find STW.h


In the static library


build setting -> build locations -> configuration_build_dir for the release configuration is

$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)


build setting -> build locations -> configuration_temp_dir for the release configuration is

$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)


build setting -> packaging ->PUBLIC_HEADER_FOLDER_PATH for the release configuration is

/usr/loca/include


The search paths at compile time for the common Framework project


-I~/Library/Developer/Xcode/DerivedData/iOSApp-fzfjswokuxdnzucfawrmvgtbhuep/Build/Intermediates.noindex/ArchiveIntermediates/iOSApp/IntermediateBuildFilesPath/

CommonFramework.build/Release-iphoneos/CommonFramework.build/CommonFramework-own-target-headers.hmap


-I~/Library/Developer/Xcode/DerivedData/iOSApp-fzfjswokuxdnzucfawrmvgtbhuep/Build/Intermediates.noindex/ArchiveIntermediates/iOSApp/IntermediateBuildFilesPath/

CommonFramework.build/Release-iphoneos/CommonFramework.build/CommonFramework-all-non-framework-target-headers.hmap



-I~/Library/Developer/Xcode/DerivedData/iOSApp-fzfjswokuxdnzucfawrmvgtbhuep/Build/Intermediates.noindex/ArchiveIntermediates/iOSApp/BuildProductsPath/Release-iphoneos/include


-I~/Library/Developer/Xcode/DerivedData/iOSApp-fzfjswokuxdnzucfawrmvgtbhuep/Build/Intermediates.noindex/ArchiveIntermediates/iOSApp/BuildProductsPath/Release-iphoneos/usr/local/include


-I~/Library/Developer/Xcode/DerivedData/iOSApp-fzfjswokuxdnzucfawrmvgtbhuep/Build/Intermediates.noindex/ArchiveIntermediates/iOSApp/IntermediateBuildFilesPath/

CommonFramework.build/Release-iphoneos/CommonFramework.build/DerivedSources/armv7


-I~/Library/Developer/Xcode/DerivedData/iOSApp-fzfjswokuxdnzucfawrmvgtbhuep/Build/Intermediates.noindex/ArchiveIntermediates/iOSApp/IntermediateBuildFilesPath/

CommonFramework.build/Release-iphoneos/CommonFramework.build/DerivedSources


Do these values get over ridden by the iOS App setting?

Any idea where/what my configuration issue might be or how to debug this?


Where does "InstallationBuildProductsLocation" come from?


thanks


Andy

UGH This was hard to figure out


Troubleshooting Application Archiving in Xcode

did not work but gave me ideas for how to debug.

https://developer.apple.com/library/content/technotes/tn2215/_index.html#//apple_ref/doc/uid/DTS40011221-CH1-PROJ


My work around was to remove the copy header files phase from the static library and add a run scrip to copy the header files to a known location. I add this location to the header paths



echo check !!!!!!!!!!! check environmental variables "${TARGET_NAME}"

echo check !!!!!!!!!!!!!!! *** PWD= `pwd`

***_TMP=/tmp/***_XCODE_STATIC_LIB_HACK

rm -rf $***_TMP

mkdir $***_TMP

find . \( -name "*.hh" -o -name "*.h" \) -exec cp {} $***_TMP \;


Some other useful tips


1) in your run script phase check show environmental variables.

2) you can use xcode build to see the build config values

https://developer.apple.com/library/content/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-HOW_DO_I_BUILD_MY_PROJECTS_FROM_THE_COMMAND_LINE_


3) I when I set a header path I created a second version that ended in a token like '***' so I could look at the compiler output and see what was going on


4) look at the output of the copy statement to figure out where the archive was trying to put the header files

It's moved to the latest archive folder in~/Library/Developer/Xcode/Archives

Archive header path missing InstallationBuildProductsLocation/usr/local/include
 
 
Q