Building Objective-C static libraries with categories
August 24, 2010
Posted by on
I just came across the usage of Linker flag -all_load and -ObjC
Basically, this is used in situations where you build a static library with Categories. When this static library is linked with the actual implemenation / application that use this library, -ObjC linker flag would inform the compiler to load all the Objective C classes implementation.
However, since there is a linker bug that prevents -ObjC from loading objects files from static libraries that contain only categories, we should use -all_load or -force_Load Linker flags.
For More Details. See Apple Technical QA QA1490