There used to be a linker flag in GCC, allow_sub_type_mismatches
, which would let you mix and match ARM architecture versions in linked libraries, but they seem to have taken that away in recent versions of Xcode.
However, this can actually be hacked around in a different way; make a copy of the framework, view its contents, open up the actual code library file inside of it in a hex editor, and do the following replace all:
CEFAEDFE 0C000000 09000000
to
CEFAEDFE 0C000000 0B000000
What you're basically doing is changing the header inside of each code object to identify it as ARMv7s rather than an ARMv7 code - the instruction sets are backwards compatible (or seem to be, anyway), so it should run fine even with this hack, though I have to admit that we won't know that for certain until we actually get a chance to test it on an iPhone 5.
Anyway, once you've modified the framework, simply add both versions to your project and link to the appropriate one from each architecture. You might also be able to create a new single framework by using lipo
to merge the modified and original libraries.