简体   繁体   中英

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM