5

I'm using the iOS-Universal-Framework XCode templates to create MyFramework. It works fine and when I add MyFramework to MyApplication, I have access to the public objects of MyFramework as expected.

The problem I have is that I am now linking the MyFramework against other static libraries : MailCore which is itself linked against some libs from iOSPorts. When I compile MyProject, it fails because the linker cannot find the MailCore static library.

I could import all the MailCore library into MyApplication but that's not what I want. How can I embed those libraries into MyFramework?

EDIT: To reformulate the question. If MyApplication uses MyFramework and MyFramework uses libCrypto.a, do I have to link MyApplication against libCrypto? iOS-Universal-Framework XCode claim that I MyFramework is supposed to embed the library and MyApplication does need to link only agains MyFramework but it's not working for me.

Thanks

Jan
  • 7,444
  • 9
  • 50
  • 74
  • Make sure you have added the library in the correct place under "Link Binary With Libraries". If you want to use the library you have to link it to the correct once you want to use. There is no way around it. – Popeye Jul 19 '12 at 12:57
  • 2
    Did you find and answer to this? I need to do the same thing. – Richard Hodges Aug 22 '14 at 21:34

1 Answers1

0

Make sure you've added the Libraries to your project in the "correct" way. This other answer may help.

How to “add existing frameworks” in Xcode 4?

Community
  • 1
  • 1
Keith Smiley
  • 61,481
  • 12
  • 97
  • 110
  • That's what I did in the MyFramework project and there I have no problems. The libraries are correctly linked. It is only when I import MyFramework into the main application that the dependency libraries are not linked – Jan Jul 19 '12 at 14:01