2

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?

Community
  • 1
  • 1

1 Answers1

0

It looks like you need to build two fat libraries, one for development and another one for deployment.

This way you can create two targets into your project (you can duplicate the existing target). One target will be used for development and be linked with the full framework. The other target will be used for archiving and will be linked to the reduced framework.

Hoping this helps...

ishahak
  • 6,585
  • 5
  • 38
  • 56