Writing Plug-ins
Shared libraries can be loaded on demand after the program has started running. They are the mechanism used to add plug-in features: build a shared library and have the program load it. Generic Unix applications can use the dyld functions to load shared libraries and get the addresses of symbols (including function pointers to executable code). Higher-level applications can load bundles at runtime. Cocoa can use the NSBundle class.
Bundles in Cocoa
A bundle is a directory containing some executable code, whether it’s a shared library or an executable program, and the various resources that support the code. Cocoa applications are bundles, as are frameworks, screensavers, iPhoto export plug-ins, and a lot of other stuff. Bundles ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access