I'm facing the same issue for macOS. Setting to "For install builds only" works for building, but not for archiving.
Post
Replies
Boosts
Views
Activity
The issue in my case was due to the project folder containing spaces. To resolve this, I went under Build Phases > Embed Apple Plug-in Libraries and wrapped $APPLE_PLUGIN_LIBRARY_ROOT on line 8 in double-quotes, like "$APPLE_PLUGIN_LIBRARY_ROOT", so that the shell treats it as a single argument. I am now able to build and archive.
I'm not sure why this happens, but I found that deleting the redefinitions allowed me to complete my build.