Is it possible to reference other common framework without including it multiple times?
I want to create an A.framework that uses B.framework (for example AFNetworking). Then I have an App that already uses B.framework, I wonder if it is possible to not include the B.framework twice. What is more, is it also possible to create the A.framework and force the user to include the B.framework?
Thanks.
No. You'll need to inform any devs using your framework of the required dependencies.
Hi jverkoey.
First of all thank you very much for your detailed description how to develop a framework!
Now I have a problem and I don't know what's the best way to avoid errors described below:
I have created 2 different frameworks and both depend on the AFNetworking framework. I have imported all classes to both frameworks.
Now when I add these two frameworks to my third party application which depends as well on the AFNetworking framework I did receive duplicate symbol errors at link time. The error log tells me, that both frameworks has duplicated symbol. See:
duplicate symbol _OBJC_IVAR_$_AFURLConnectionOperation._outputStream in:
/Users/dominik/Projects/Abacus/ios/AbaTrack/AbaWeatherForecast.framework/AbaWeatherForecast(AFURLConnectionOperation.o)
/Users/dominik/Projects/Abacus/ios/AbaTrack/AbaOSM.framework/AbaOSM(AFURLConnectionOperation.o)
Could you please tell me what's the "right" way to deal with external dependencies during framework development? Do I have to rename all the AFNetworking classes with prefixes in both frameworks? Or is there a better way to avoid those errors?
Thanks in advance! dominik
@dominik0711 how did you solve this?