The "selector not recognized" runtime exception occurs due to an issue between the implementation of standard UNIX static libraries, the linker and the dynamic nature of Objective-C. Objective-C does not define linker symbols foreachfunction (or method, in Objective-C) - instead, linker symbols are only generated foreachclass. If you extend a pre-existing classwith categories, the linker does not know to associate the object code of the core class implementation and the category implementation. This prevents objects created in the resulting application from responding to a selector that is defined in the category.
This flag causes the linker to load every objectfilein the library that defines an Objective-Cclassorcategory. While this option will typically resultin a larger executable (due to additional object code loaded into the application), it will allow the successful creationof effective Objective-Cstatic libraries that contain categories on existing classes.
Important: For 64-bit and iPhone OS applications, there is a linker bug that prevents -ObjC from loading objects files from static libraries thatcontain only categories and no classes. The workaround isto use the -allload or -forceload flags.