I've built a Framework for distribution (not open source),everything is working despite Xcode
not having a nice support for developing Frameworks.
The problem is that when archiving for AppStore
you get the error:
The executable <EXECUTABLE_NAME_AND_PATH>.framework contains unsupported architectures[x86_64,i386]
The solution to the error above is to strip out the architectures mentioned, as already discussed in this question and in other sources as well.
The problem is that to use the binary on Xcode
it is necessary to have all architectures, but to archive I cannot have all of them. How to build the framework in a way that it contains all the architectures (or in a way that simulators
accept it) and still be able to archive and upload to AppStore
without using the custom scripts to strip the exceeding architectures?