1

I have developed a swift dynamic framework (Cocoa touch framework)

Inside that framework i am using the GoogleMobileAds framework (admob ads)

Say this framework is called x.framework

Now, inside a project i want consumers to use this framework that is embed it inside their project.

The problem comes when the consumer project use the GoogleMobileAds in its own project (regardless of the framework)

I get an error of:

Class is implemented in both and . One of the two will be used. Which one is undefined.

How can i overcome this so even if the consumer project use the library it will embedding the framework will not cause errors?

I tried weak-linking the framework with no luck so far

Michael A
  • 5,770
  • 16
  • 75
  • 127
  • This link might help you :- http://stackoverflow.com/questions/27727455/class-x-is-implemented-in-both-framework-and-application-one-of-the-two-will – Vizllx Jul 29 '15 at 07:26
  • 1
    You'll have to either change the class name in one of the copies of the library or framework or figure out a way to only link one copy of the class. Weak linking, etc, isn't going to help. – bbum Jul 29 '15 at 07:54
  • @bbum i am having hard time with this, as i understand the best approach is not to link the conflicted classes in the framework, but as i know how it is done in Android i am three days with no success at Xcode, help needed. started bounty with this: http://stackoverflow.com/questions/31718790/xcode-reference-a-framework-instead-of-link-binary-with-libraries – Michael A Aug 02 '15 at 13:58

0 Answers0