Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between a Cocoa framework and a C static library?

Can someone explain to me the fundamental differences between a Cocoa framework and a C static library?

In particular, I'm finding out that in both cases I have to reference the file (.framework or .a) in the "Link Binary with Libraries" part for my target in Xcode.

However, I don't seem to have to put the .a in "Copy Files". I only have to put .framework into "Copy Files". What is the reason for this difference?

like image 966
Enchilada Avatar asked Jan 20 '23 04:01

Enchilada


1 Answers

A static library is actually compiled as part of your app, whereas a framework is distributed with your app (or system frameworks are already present) and linked dynamically. Also see this question.

like image 85
jtbandes Avatar answered May 08 '23 21:05

jtbandes