Difference between static and dynamic library in Xcode for iPhone Difference between static and dynamic library in Xcode for iPhone xcode xcode

Difference between static and dynamic library in Xcode for iPhone


While you can build dynamic libraries for Mac OS X, you cannot use them for iPhone development.

A static library is merely an archive of object files that gets pulled into a program linking against it. The linker will unarchive all the archive files, and pull them in during linking along with the rest of your object files.

A dynamic library however, creates a shared object file, akin to a program but without an entry point, which programs can link against and call out of themselves into these shared libraries for their symbols, without pulling them into itself.


A dynamic library wouldn't make any sense for an iphone app as there is no way to install the library on the phone. I remember reading some documentation where apple stated they decided not to use dynamic libraries as they didn't want users to have to deal with hassles of finding/updating libraries. Much easier to just install 1 bundle per app.


Apple does allow you to make dynamic libraries. On Mac OS X, these end in .bundle or .dylib (not .so or .a like on Linux).

What, specifically are you trying to do? Did you create a target for your dylib?