When the CateGory is used in the framework, the call app appears "selector not recognized", the workaround is to call the app's Build Settings--and linking-> other Li Nker Flags, plus-OBJC or-all_load.
Here are the reasons for the online reprint:
The use of this flag is related to an important feature of OBJECTIVE-C: category. As explained here, there are some conflicts between the standard static library implementation of UNIX and the dynamic nature of Objective-c: Objective-c does not define a link symbol for each function (or method), it creates a link symbol for each class. This way, when you use categories in a static library to extend an existing class, the linker does not know how to integrate the methods in the original class with the method in the category, causing you to invoke the method in the category with "selector not recognized", which means that the method definition error is not found. In order to solve this problem, the-OBJC flag is introduced, and its function is to load all the object-related files in the static library.
This can solve the problem, but in the 64-bit Mac system or iOS system, the linker has a bug, will cause only a class of static libraries can not use the-OBJC flag to load the file. The workaround is to use the-all_load or-force_load flag, which is to load all the files in the static library, but All_load works on all the libraries, and the-force_load must specify the specific file later.