If you're having a problem building an Archive, this might help you.
I don't use a workspace, and while I could build both release and debug, I couldn't build an Archive for Testflight. I got an error about headers missing from TheAmazingAudioEngine.h.
This solved it from a previous post:
Hey @fbunn - Ah, yes, if you're using the same architecture (an Xcode workspace with the app as a subproject), then you need to do a bit of messing with the header search paths. Take a look at the TAAE2 sample app's project settings; you'll find
"$(BUILT_PRODUCTS_DIR)"in the header search paths for the debug build, and that as well as
"$(TEMP_ROOT)/UninstalledProducts/$(PLATFORM_NAME)"for the release build.