I had the same problem but fixed it by:
Setting the team to None in the General tab of the target settings.
Changing this value seems to also reset the code signing params in the build settings, to ‘iOS Developer’ for both debug and release. If it doesn’t then change these params yourself.
I can now build my framework with no errors.
The newly built framework can be checked for signing by entering codesign –display –verbose=4 FRAMEWORK_PATH into the terminal.
This tool should return: code object is not signed at all