Question

Foundation's NSBundles are the best way to load dynamic code in Objective-C. The -load method dynamically loads the bundle's executable code into a running program.

But, which Objective-C runtime public function does the NSBundle's -load method use to load a dynamic library and register classes, categories, protocols, methods, selectors, etc, with the Objective-C runtime? In which header is it declared?

Was it helpful?

Solution

NSBundle doesn't use the ObjC runtime for that. It uses dlopen, and the dynamic linker handles loading things.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top