Address: http://blog.csdn.net/shaobojohn/article/details/7953007
An exception was thrown during project compilation today. <nsinvalidargumentexception> + [nsinvocation invocationwithmethodsignature:]: Method signature argumentcannot be nil. However, we can see that this class exists in the project. Finally, we thought about it. Because the runtime call is used and the import is not in the header file, we cannot find this class during link, after reading it online, you only need to go to other
You can add-objc to the linker flag and find it correct after adding it. However, you still need to understand the meaning of this compilation option, so I checked it on the network, finally, find an English explanation.
-All_load loads all members of static archive libraries.
-Objc loads all members of static archive libraries that implement an objective-C class or
Category.
-Force_load (path_to_archive) loads all members of the specified static archive library. Note:
-All_load forces all members of all archives to be loaded. This option allows you to target a specific archive.
-All_load is used to load all the members in the static library file.-objc is used to load all the members that implement a class or classification in the static library file.-force_load (package path) load all the members in the static library file of the specified path. Therefore, the reflection call method when using runtime should use one of the three links to ensure that all classes can be loaded into the memory for dynamic calls by the program.