kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 473 forks source link

Duplicate symbols workaround? #156

Open MattFoley opened 10 years ago

MattFoley commented 10 years ago

I'm spending today attempting to do some research into renaming all of the symbols of a static framework after compilation.

Our SDK is quite large, and needs to use quite a bit of external libraries, PayPal, AFNetworking, and many other files that may be used by our publishers, or other frameworks our publishers use.

Currently, to avoid having duplicate symbol linking issues we are using a preprocessor macro to rename files with possible collisions. -DSomeSymbol=PrefixSomeSymbol.

I was wondering if someone using this framework had also faced this issue and had found a solution that solves this more succinctly.

bigsprocket commented 10 years ago

Look at the file inspector for each of those 3rd party frameworks that are giving you trouble. Make sure "target membership" is NOT checked for your framework target.

When building an app, your publishers will need to link to, and check the target membership box for, each of those same 3rd party libraries.