How to avoid duplication of characters between third-party structures

I have a dilemma. I added 2 frameworks to my project, and so it just happens that both use JSONKit. Therefore, when I compile my project, I get duplicate characters between these two frames.

I had to add -ObjC -all_load to my build settings, otherwise I get runtime errors (crashes) due to some categories not compiling.

Any ideas?

+7
source share
1 answer

When you link the static library, the linker inserts all the characters into your final binary. (why is it called static.) There really is no good way to remove certain characters, because there is no difference between the original characters and the new inline characters. Even you can remove duplicate characters, no one can be sure that duplicate characters are the same version. If a modified version of the JSONKit library is used in one library, it will be violated if you replace it with another version.

The only way is to get the .a file without duplicated characters, or get the source code and compile them yourself. If the creators of lib are not idiots, they should offer some version of the library without embedded characters. If there is no such thing, I highly recommend not using this library. Because he is not worried about the conflict of characters, which means that he is made by a real newbie, which means that he is full of problems.

+2
source

All Articles