0

You call Library code and Framework code calls your code.

I've been doing a number of xcode projects which required adding external frameworks and libraries.

In the installation of these there was always one common occurance, they would always ask me to go to the Build Phases tab and "link the binary with libraries"

enter image description here

My question is why do both frameworks and libraries get linked this way? I (think) I understand why a library does. For libraries they can't execute themselves so you are pre-compiling them and making their functions available to your classes.

For the framework I am much less clear whats happening here. If the framework calls my code why is this being pre-compiled as a binary? If it's executing my code at runtime should it just be compiled along with the build?

Aggressor
  • 13,323
  • 24
  • 103
  • 182
  • May be this [link][1] can help you. [1]: http://stackoverflow.com/questions/148747/what-is-the-difference-between-a-framework-and-a-library – Rajesh Jul 29 '15 at 07:40

1 Answers1

0

A Framework is a way to bundle a static/dynamic library and it's headers (.h) together. There is also a concept of "versioning" but thats not really used anymore.

If you look into a Framework (its just a directory ), you will see the library (without the .a and "lib" prefix , headers, and a .plist.

SonicBison
  • 790
  • 7
  • 21