2

I am building a framework using the tutorial described in here. My framework uses some third party frameworks.

When I am using this framework in a demo project, I get linker errors that symbols cannot be found for architecture etc. Probably the reason, is because in the demo project I should also link against those third party frameworks.

Now, I don't want to reveal to the users which frameworks/libraries I am using.

So my goal is:

  1. Adding those third party frameworks embedded inside my own framework without the need to link them again in the demo project.

  2. If the user tries to use one of my third party frameworks in his own project, there should not be duplicate symbols errors.

Is it possible?

P.S. The new Apple's iOS 8 frameworks do solve all my problems (I guess because they are linked dynamically), but unfortunately, they are not an option.

Thank you very much!

user-123
  • 874
  • 1
  • 13
  • 34

1 Answers1

1

Include your third parity frameworks path in LIBRARY_SEARCH_PATH

Kenshin
  • 1,030
  • 2
  • 12
  • 41
  • will this work in this case? http://stackoverflow.com/questions/34025698/fat-framework-dependency-is-not-fat – arc4randall Dec 01 '15 at 16:56
  • Don't use cocoa touch static lib, use cocoa Touch Framework instead. This is more elegant than the former. Add all your third party frameworks to Framework folder and set path in Library search path with recursive option. And, reveal only header files to public by changing its setting from "Project" to "Public" – Kenshin Dec 01 '15 at 17:21
  • I used cocoa Touch Framework. Now I am just not finding the -lAFNetworking library at all – arc4randall Dec 01 '15 at 17:25
  • After adding libraries, you might encounter the following issue. That time, please refer this link http://stackoverflow.com/questions/27008671/how-to-use-third-party-lib-in-embedded-dynamic-framework-for-ios-with-swift – Kenshin Dec 01 '15 at 17:38
  • solved your problem ?. Cocoa touch framework by default exports framework as dynamic library. This is the only option to hide your 3rd party libraries. But remember it works only in iOS 8 and above. – Kenshin Dec 05 '15 at 07:08