NSBundle doesn't use the ObjC runtime for that. It uses dlopen, and the dynamic linker handles loading things.
How does the NSBundle's -load method register classes and other runtime resources with the Objective-C runtime?
-
12-01-2022 - |
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?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow