tezvyn:

Static library versus dynamic framework linking

Source: interviewintermediate

WHAT IT TESTS: linking models and their runtime cost. OUTLINE: static code is copied into the executable at build time; dynamic is loaded at launch by dyld. Trade-off: static bloats the binary but avoids load cost; many dynamic frameworks slow launch.

WHAT IT TESTS: understanding when symbols are resolved and the launch-time consequences. ANSWER OUTLINE: a static library is linked at build time, its code copied into the app executable, so there is no per-launch load cost but the binary grows and duplicated code can bloat. A dynamic framework is a separate binary the dynamic linker dyld loads and resolves at launch; it enables sharing and smaller per-target copies but each one adds dyld work that slows startup.

Read the original → interview

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Static library versus dynamic framework linking · Tezvyn