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 ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.